Note :This post is first published on Nov-2011 in my previous blog Techkindle. Moving the content here.

Swapping Two Integers using different methods.

  1. Using Temporary variable
  2. Using Arithmetic Operators
  3. Using EX-OR operator

Here is the complete source code.

Output it as shown Below:

Happy Learning 🙂