 Timer is Running

Magic in CPP
##### Submissions: 5659   Accuracy: 71.84%   Difficulty: Easy   Marks: 2

This Module is all about pointers and how they can be cleverly employed to solve typical CPP problems. Later on, we'll dive into OOP and learn Classes that form the base of CPP-OOP.

Given two integers A and B. The task is to swap two numbers. Swapping here means to interchange the values of A and B.

Input Format:
First line of input contains T, denoting the number of testcases. For each testcase, there will be a single line containing A and B seperated by space.

Output Format:
For each testcase, swap the values of A and B.

Your task is to complete the two swap() functions, such that values of A and B gets interchanged.

Constraints:
1 <= T <= 100
1 <= A, B <= 106

Example:
Input:

1
3 5

Output:
5 3

Explanation:
Testcase :
Here, A = 3 and B = 5. After swapping A = 5 and B = 3.

#### ** For More Input/Output Examples Use 'Expected Output' option **

Author: Dhiman Mayank

If you have purchased any course from GeeksforGeeks then please ask your doubt on course discussion forum. You will get quick replies from GFG Moderators there.