Question: Write a program to pass two numbers from main function to function foo, swap the numbers in a function foo and print the swapped

Write a program to pass two numbers from main function to function foo, swap the numbers in a function foo 

Write a program to pass two numbers from main function to function foo, swap the numbers in a function foo and print the swapped value in main function using call by value method.

Step by Step Solution

3.38 Rating (151 Votes )

There are 3 Steps involved in it

1 Expert Approved Answer
Step: 1 Unlock

Below is an example of a simple C program that accomplishes what you described using call by value ... View full answer

blur-text-image
Question Has Been Solved by an Expert!

Get step-by-step solutions from verified subject matter experts

Step: 2 Unlock
Step: 3 Unlock

Students Have Also Explored These Related Programming Questions!