Capgemini interview question

Swap two numbers without using temp variable.

Interview Answers

Anonymous

21 Sept 2016

a=a*b; b=a/b; a=a/b;

Anonymous

2 Sept 2016

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

4