The Gateway to Computer Science Excellence
First time here? Checkout the FAQ!
x
+1 vote
415 views
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) | 415 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.

Reference:
http://courses.cs.washington.edu/courses/cse341/03wi/imperative/parameters.html
answered by Boss (18.3k points)
selected by
0
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
0
okay. So how do you compare call by value and call by reference in terms of robustness?
0
I knew I embroiled myself on the wrong course...I take back my words :(
0
Humm.. If call by value is robust, then call by value result must also be robust.

Related questions

+1 vote
1 answer
6


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

44,462 questions
49,919 answers
165,465 comments
65,898 users