
main
{
int a[2] = {2,3};
printf("before swapping: %d %d\n",a[0],a[1]);
//a[0] ^= a[1];
//a[1] ^= a[0];
//a[0] ^= a[1]; //this is working correctly.
a[0] ^= a[1] ^= a[0] ^= a[1]; //this didn't work correctly why?
printf("after swapping: %d %d\n",a[0],a[1]);
}

hi friend,
This is because the XOR operator is valid for only two operands.
For detail tutorial please go through the following link
http://www.roseindia.net/java/master-java/java-bitwise-xor.shtml
If you are facing any programming issue, such as compilation errors or not able to find the code you are looking for.
Ask your questions, our development team will try to give answers to your questions.