Re: Swapping variables value without temp variable?
The solution /w adding subtracting will work for the most part. But has the weakness of not being able to handle overflow or rounding issues. The geekier way is basically do the same thing but XOR the bits instead.
Since this is a bitwise operation, this will not be prone to overflow error, but the downside is it only works if the 2 numbers are of the same data type.