How to Swap Two Numbers Without Using Temporary Variable or Arithmetic Operators?
You have done swapping of two numbers using temporary variable or by using arithmetic operators. It can be done in following way. Lets take two numbers a=5 and b=7. Using Temporary Variable temp=a; //temp becomes 5 a=b; //a becomes 7 b=temp; //b becomes 5 Also Read: C++ program to swap two numbers using pointers Also Read: C++ …
How to Swap Two Numbers Without Using Temporary Variable or Arithmetic Operators? Read More »