Qualcomm interview question

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

Interview Answers

Anonymous

Feb 7, 2012

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

Anonymous

Apr 28, 2016

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