The Gateway to Computer Science Excellence
+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.
in Programming by | 554 views

1 Answer

+2 votes
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.

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.
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
52,345 questions
60,471 answers
95,278 users