Discussion
Which of the following parameter passing methods works with the idea that the argument is not evaluated until its actual use as a parameter in the called program ?
Answer: B
The method is Pass by Name.
In call by name, introduced in Algol 60, the actual argument is not evaluated at the call. It is passed unevaluated (in practice as a small routine, a thunk), and re-evaluated in the caller's environment each time the parameter is used in the called procedure. This is the idea behind lazy evaluation.
Pass by value evaluates the argument once at the call and copies the value. Pass by reference passes the address of an already-evaluated variable. Pass by value-result copies the value in at the call and copies it back on return.
Post your comment
Please log in or register to post a comment.
Examination Categories
- SSC Exams
- Banking Exams
- Teaching Exams
- Civil Services Exams
- Railways Exams
- Engineering Recruitment Exams
- Defence Exams
- State Government Exams
- Police Exams
- Insurance Exams
- Nursing Exams
- Other Government Exams
- NRA CET
- PG Entrance Exams
- Campus Placement
- MBA Entrance Exams
- CUET and UG Entrance
- Judiciary Exams
- Regulatory Body Exams
- Software Development