Function Call By Value In C

Call By Value

Function call by value is the default way of calling a function in C programming.

In call by value, a copy of actual arguments is passed to formal arguments of the called function and any change made to the formal arguments in the called function have no effect on the values of actual arguments in the calling function.

In call by value, actual arguments will remain safe, they cannot be modified accidentally.

Example 1:


 n1: 10, n2: 20

Example 2:


 value1 is: 10
 value2 is: 11