Intel Corporation Interview Question

How would you add two numbers without using a local variable in order to keep the result?

Interview Answer

Anonymous

Sep 27, 2015

a=a+b b=a-b=a+b-b = a a=a-b = a+b -a = b