suresh bhandari


{ City } agra
< Country > india
* Profession * sat
User No # 9546
Total Questions Posted # 0
Total Answers Posted # 1

Total Answers Posted for My Questions # 0
Total Views for My Questions # 0

Users Marked my Answers as Correct # 2
Users Marked my Answers as Wrong # 1
Questions / { suresh bhandari }
Questions Answers Category Views Company eMail




Answers / { suresh bhandari }

Question { Manhattan, 223346 }

How to swap two variables, without using third variable ?


Answer

---------------------
a=a*b
b=a/b
a=a/b
---------------------
a=a+b
b=a-b
a=a-b
----------------------
a = a Xor b
b= a Xor b
a= a Xor b
----------------------
all above three methods are correct, i hv checked...

Is This Answer Correct ?    2 Yes 1 No