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.
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.
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.
1 <= T <= 100
1 <= A, B <= 106
Testcase : Here, A = 3 and B = 5. After swapping A = 5 and B = 3.
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.