how to swap using bitwise operator code example
Example: how to swap using bitwise operator
#include<stdio.h>
void main()
{
int a,b;
printf("Enter the value of a and b: ");
scanf("%d %d", &a, &b);
a = a^b;
b = b^a;
a = a^b;
printf("Value of a is: %d\n", a);
printf("Value of b is: %d\n", b);
}