#include<stdio.h> #include<conio.h> int main() { int a,b; //clrscr(); printf("Enter the Values of a and b : "); scanf("%d %d",&a,&b); printf("Actual values : \n a=%d \t b=%d",a,b); a=a^b; b=a^b; a=b^a; printf("\n After Swapping : \n a=%d \t b=%d",a,b); return 0; }
OUTPUT:
Enter the Values of a and b : 5 7 Actual values : a=5 b=7 After Swapping : a=7 b=5
Other Methods: