Swapping two variable value without using 3rd variable
- by Muhammad Akhtar
One of the very tricky question asked in an interview...
we need to swap the values of two variables like a=10 and b=15
Generaly to swap two variables values, we need 3rd variable like..
temp=a
a=b
b=temp
Now the requirement is, swaping value of two variable values without using 3rd variable?
How can be accopmplish this?