I am going to say this as nice as I feel like.
Stop bombing the C forum with trivial questions.
You are just going to annoy everyone around here.
Do some "work of your own first". Search the forum. Show some initiative.
Which is of course broken and pointless, yet some people still think it is somehow relevant to the modern world of programming in high level languages. It was nothing more than a neat trick you could pull off in assembler.
As long as you keep the sequence points intact and the two values are the same ordinal type then you can do it just fine: a ^= b, b ^= a, a ^= b; Remember though, the result of this expression is the final value of a.