Engaged Employer
how to swap 2 numbers without using third variable in c programming?
Anonymous
I knew the solution to this question. So it was easy for me to answer this. The logic is to take sum of the numbers and store it in one of the two variables. then the logic goes like below... a=a+b; b=a-b; a=a-b; check this by simple example....it works...
Check out your Company Bowl for anonymous work chats.