C program Swapping two numbers
The process of Exchanging values of two variable is called swapping . The following two C program swap two numbers by calling the swap function by reference (address of variable). The first one swap two numbers with help of a temporary variable and latter one swap two number without a temporary variable. given two numbers x =10 and y=15; swap(x,y) results - print x=15 and y=10 Swapping two numbers - C programming code The c program swaps value of two variable x and y using a temporary variable. The value of the variable x and y are given as input and prints swapped value from the variables as the result. # include <stdio.h> void swap ( int *x, int *y) { int temp = *x; *x =*y; *y =temp; } int main () { int x=0,y=0; printf("\n swap two numbers - call by reference"); printf("\nEnter value for x :"); scanf("%d",&x); printf("\nEnter value...