The Gateway to Computer Science Excellence
First time here? Checkout the FAQ!
+1 vote
Various parameter passing mechanisms have been in used in different programming languages. Which of the following statements is true?
(a) Call by value result is used in language Ada
(b) Call by value result is the same as call by name.
(c) Call by value is the most robust.
(d) Call by reference is the same as call by name.
(e) Call by name is the most efficient.
asked in Programming by Loyal (6.9k points) | 433 views

1 Answer

+1 vote
Best answer
(a) is true. Ada supports in-out parameter passing, which is nothing other than call by value result (but Ada in GATE syllabus?)
(b) Not true.
(c) Most robust? I don't know what is meant by robust here.
(d) Not true.
(e) Not true. Because in call by name, the parameter is re-evaluated at every occurrence of the formal paramater and hence efficiency will only be less.

answered by Boss (18.2k points)
selected by
I think by robust they mean not having problems that call by name(with arrays) and call by value results(same parameters passing twice) have...thanks
okay. So how do you compare call by value and call by reference in terms of robustness?
I knew I embroiled myself on the wrong course...I take back my words :(
Humm.. If call by value is robust, then call by value result must also be robust.

Related questions

Quick search syntax
tags tag:apple
author user:martin
title title:apple
content content:apple
exclude -tag:apple
force match +apple
views views:100
score score:10
answers answers:2
is accepted isaccepted:true
is closed isclosed:true
49,443 questions
53,648 answers
70,908 users