Function Calling in C -II

 Call by Reference:

We call a function by passing the addresses of actual parameters then this way of calling the function is known as call by reference. In call by reference, the operation performed on formal parameters, affects the value of actual parameters because all the operations performed on the value stored in the address of actual parameters. It may sound confusing first but the following example would clear your doubts.

 Example 1:



Example 2:

Code:


Output:


 


Comments