29. Pointer- Swap Value

You are given two integers a and b. Write a function that swaps their values using pointers. You must pass the addresses of both variables to the function. After swapping, print their updated values in main().
 

Example-1

Input: a = 10, b = 20
Output: a = 20, b = 10


Example-2

Input: a = -5, b = 15
Output: a = 15, b = -5


 

Loading...

Input

10 20

Expected Output

a = 20 b = 10