On 12/08/2011 03:32 PM, Paul LaFollette wrote: > Kind people, > I am befuddled, and looking for understanding: > > int a, b; > a = 7; > b = 12; > > a ^= b; > b ^= a; > a ^= b; > > should swap the contents of a and b (and it does). > Since ^= associates to the right > > a ^= b ^= a ^= b; > > should do the same thing (and it does). No, because you're modifying an object more than once between sequence points. More at http://c-faq.com/expr/seqpoints.html Andrew.