Anonymous answered The best way to swap between two numbers is by using the basic concepts of mathematics,nothing more...it's so easy!! Consider a=10,b=5. Now take , a=a+b (i.e.10+5=15) b=a-b; (i.e.15-5=10) a=a-b (i.e. 15-10=5) That's so simple...
Anonymous answered All the above may cause overflow. The one line answer which is full proff is this:A=a+b-(b=a)