Interview Solution

Increasingly, people seem to misinterpret complexity as sophistication, which is baffling - the incomprehensible should cause suspicion rather than admiration. Niklaus Wirth

Swap Number

Language Java | Level Intermediate | Category Interview Problems | July 24, 2015 4:52 pm

Comments


Interview Problem

Swap two Numbers without using any temp variable.
Write program to swap two integer without using any temporary variable
Example:-
Given integer a = 4 and b=5
The result change a = 5 and b = 5


Output

   					 
Before swap: a=4 b=5
After swap: a=5 b=4

				    

Comments



Please login to add comments.