This equation swaps two numbers without a temporary variable, but uses arithmetic operations:
a = (a+b) - (b=a);
How can I do it without ar
In addition to the above solutions for a case where if one of the value is out of range for a signed integer, the two variables values can be swapped in this way
a = a+b; b=b-(-a); a=b-a; b=-(b);