C Program to Swap Two Numbers using Pointer
Write a C program to swap two numbers using pointer and the temporary variable. In this example, the swapTwo function accepts two pointer variables integer types. Next, using the temporary variable, we swapped them. #include <stdio.h> void swapTwo(int *x, int *y) { int temp; temp = *x; *x = *y; *y = temp; } int … Read more