1.

How do two functions exchange data between them? Compare the two methods of data transfer from calling function to called function.

Answer»

There are two methods they are call by value and call by reference 

1. call by value:

In call by value method, a copy of the actual parameters are passed to the formal parameters. If the function makes any change it will not affect the original value.

2. call by reference: 

In call by reference method, the reference of the actual parameters are passed to the formal parameters. If the function makes any change it will affect the original value.



Discussion

No Comment Found