#include <stdio.h>
void swap(int*, int*);
int main()
{
int x, y;
printf("Enter the first value\n");
scanf("%d",&x);
printf("Enter the second value\n");
scanf("%d",&y);
printf("Before Swapping\nx = %d", x);
printf("Before Swapping\ny = %d", y);
swap(&x, &y);
printf("\n After Swapping\nx = %d",x);
printf("\n After Swapping\ny = %d",y);
return 0;
}
void swap(int *a, int *b)
{
int temp;
temp = *b;
*b = *a;
*a = temp;
}