C++ program to swap two numbers using call by value.

 

Sample Input
Enter Value Of 1st no.:124
Enter Value of 2nd no.:224
Sample Output
Before swapping
Value of 1st no. is 124
Value of 2nd no. is 224
Inside function after swapping
Value of 1st no. is 224
Value of 2nd no. is 124
Outside function after swapping
Value of 1st no. is 124
Value of 2nd no. is 224

You may also like...