Sunday, November 30, 2008 by Mohan K.V
“Cha, if we could XOR swap the dal and palak we wouldn't need a third bowl da.”
As Charles ‘Peanuts’ Schulz said, "Happiness is a warm Nai." (and a hungry Nikhil and TS).
The title is the poor man’s swap program. It interchanges the values of ‘a’ and ‘b’ without using a third variable. The XOR swap does exactly the same thing, but the incisively analytical reader would of course prefer the XOR swap because it sounds cooler :-)