Qualcomm interview question

c programming problem. Swap variable x and y without using a temporal variable

Interview Answers

Anonymous

7 Feb 2012

x = x ^ y y = x ^ y x = x ^ y

Anonymous

28 Apr 2016

x=x-y y=x+y x=y-x