Hi all,
It might b an old question but how can i swap two variables without applying any arithmatic operation...
|
Go4Expert Founder
|
![]() |
| 10Sep2006,16:22 | #2 |
|
This can be done by applying any 2 operations that are are opposite to each other in nature like + and - * and /. The above are arithmetic operations and so if you cant use them you need to be doing either shifting or using the & / | to achieve the same
Code:
a = a OP1 b b = a OP2 b a = a OP2 b |

