#include<stdio.h>
int main()
{
int x, y;
printf("Enter x : \n");
scanf("%d", &x);
printf("Enter y : \n");
scanf("%d", &y);
printf("Before Swapping \n");
printf("x is %d \n", x);
printf("y is %d \n", y);
printf("After Swapping \n");
printf(swap(x, y));
}
swap(int a , int b)
{
int temp;
temp = a;
a = b;
b = temp;
printf("x is %d \n", a);
printf("y is %d \n", b);
}
To embed this project on your website, copy the following code and paste it into your website's HTML: