Write a C program to swap two numbers using bitwise operator.



#include<stdio.h>
#include<conio.h>
void main()
{
 int a,b,t;
 clrscr();
 printf("Enter the value of a=");
 scanf("%d",&a);
 printf("Enter the value of b=");
 scanf("%d",&b);
 a=a>>0;
 b=b<<0;
 t=a;
 a=b;
 b=t;
 printf("The swaped value of \n a=%d \n b=%d",a,b);                      
getch();
}
/* output
Enter the value of a=34
Enter the value of b=54                                                        
The swaped value of                                                            
 a=54                                                                           
 b=34 */