In which of the following cases is it possible to obtain different results for call by reference and call by name parameter passing methods?
Passing the address of an array as a parameter is possible to obtain different results for call by reference and call by name parameter passing methods.
Call by reference:-
When we pass the address of an array while calling a function then this is called function call by reference. When we pass an address as an argument, the function declaration should have a pointer as a parameter to receive the passed address.
Pass by name:-
This technique is used in programming language such as Algol. In this technique, symbolic “name” of a variable is passed, which allows it both to be accessed and update.