Explain the difference between call by value and call by reference in C language?
S.no | Call By Value | Call By Reference |
---|---|---|
1. | Passing variable values when calling a function is called Call By Values | Passing variable location when calling a function is called Call By Reference |
2. | Values of calling function variable to get copied into dummy variables | Address of actual variables get copied into the dummy variables |
3. | Changes have no impact on values of actual variables | Changes can manipulate real variables |
4. | Cannot alter the values of actual variables | Possible to alter the values of variables |
BY Best Interview Question ON 06 Feb 2019