C/C++: Swap Two Value by XOR

#include<stdio.h>
int
main()
{
int one=20;
int two=21;

one ^= two;
two ^= one;
one ^= two;

printf(“new one is:%d, new two is:%d\n”, one, two);

return 0;
}

Discussion Area - Leave a Comment




Spam Protection by WP-SpamFree Plugin