C++ program to swap 2 characaters and integers by call by address

 

Sample Input
Enter 1st character:A
Enter 2nd character:B
Enter 1st integer:1
Enter 2nd integer:2
Sample Output
Before swapping
Value of 1st character:A
Value of 2nd character:B
Value of 1st integer:1
Value of 2nd integer:2
In function
Value of 1st integer:2
Value of 2nd integer:1
In function
Value of 1st character:B
Value of 2nd character:A
After swapping
Value of 1st character:B
Value of 2nd character:A
Value of 1st integer:2
Value of 2nd integer:1

You may also like...