Originally Posted by xpi0t0s View Post
This code has undefined behavior, since it modifies the lvalue a twice without an intervening sequence point.

See http://en.wikipedia.org/wiki/XOR_swap_algorithm

The "Reasons for avoidance in practice" part is also worth a read.
Yeah, I know abt that.
That's why I added :
I know what you are trying to ask, and I am answering what you want to hear ::
The guy wanted that XOR form.

But I still don't understand why it has "undefined" behavior.
I read the theories, but am unable to find an example.
abhisek dash like this