in Programming in C edited by
1,700 views
9 votes
9 votes

Various parameter passing mechanisms have been in used in different programming languages. Which of the following statements is true?

  1. Call by value result is used in language Ada.
  2. Call by value result is the same as call by name.
  3. Call by value is the most robust.
  4. Call by reference is the same as call by name.
  5. Call by name is the most efficient.
in Programming in C edited by
1.7k views

1 comment

2
2

2 Answers

2 votes
2 votes
edited by

4 Comments

Hello zambus.

I didn't find any reason in the link you provided , that supports the argument of option (e).

Explain in detail.
6
6
What is meant by effiiciency here?

Call by name re-evaluates an expression at each occurrence. How is that efficient?

The memoized version of call by name, which is "call by need" is more effective, clearly.

 

Option A is a straight fact, it should be the answer.
4
4
yes, correct. Thats the best way to answer in objective examination. But while preparing it is good to reason out why each option is right/wrong.
4
4
Yes, Arjun sir, I try to reason out each option while preparing ^_^
1
1
1 vote
1 vote

I accept the fact that option A is right. But can anyone please tell why option B isn't correct. 
Let a = 3; If we call by value i.e. 3, it's fine & if we call by name i.e. 'a', it is again 3.
It seems to be correct both ways.  :)

edited by
Answer:

Related questions