// WRITE A C PROGRAM TO EXCHANGE THE VALUE OF TWO VARIABLES
#include <stdio.h>
void main()
{
int x,y,temp;
printf("enter the value of x and y\n");
scanf("%d %d",&x,&y);
printf("x = %d y = %d\n",x,y);
// exchange the value of two variables
temp=x;
x=y;
y=temp;
printf("x = %d y = %d\n",x,y);
}
0 Comments