Note :This post is first published on Nov-2011 in my previous blog Techkindle. Moving the content here. Swapping Two Integers using different methods.
- Using Temporary variable
- Using Arithmetic Operators
- Using EX-OR operator
Here is the complete source code. https://gist.github.com/gopigujjula/5412542 Output it as shown Below:
Happy Learning :)