Question: Algol-60 provided two parameter-passing mechanisms: call-by-value and call-by-name. (i) Explain these mechanisms. (ii) Justify or criticize the statement that the former is expensive for arrays
Algol-60 provided two parameter-passing mechanisms: call-by-value and call-by-name. (i) Explain these mechanisms. (ii) Justify or criticize the statement that “the former is expensive for arrays and the latter interacts badly with side effects”. (iii) What parameter-passing mechanism(s) do C and Java use, and how do such languages deal with an array being passed as a parameter?
Step by Step Solution
3.45 Rating (158 Votes )
There are 3 Steps involved in it
The detailed answer for the above question is provided below ANSWER i In the callbyvalue mechanism a ... View full answer
Get step-by-step solutions from verified subject matter experts
