1,449 views
3 votes
3 votes
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.

1 Answer

Best answer
3 votes
3 votes
(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
selected by

Related questions

0 votes
0 votes
0 answers
1
Rahul_Rathod_ asked Oct 3, 2018
527 views
from below list of parameter passing techniques, which parameter passing technique we can implement in c?1) call by value2) call by refference3) call by value result4) ca...
0 votes
0 votes
1 answer
2
Arun Rout asked Jan 7, 2019
727 views
#include<stdio.h>int fun(int arr[]){ arr=arr+1; printf("%d",arr[0]);}int main(void){ int arr ={10,20}; fun(arr); printf("%d",arr[0]); return 0;}A.COMPIL...
0 votes
0 votes
1 answer
3
Balaji Jegan asked Nov 15, 2018
1,324 views
Predict the Output for both the snippets for the following:1. Call by Value2. Call by Reference3. Call by Need4. Call by Name5. Call by value Result/Call by value Return(...
0 votes
0 votes
0 answers
4
Hira Thakur asked Sep 13, 2018
305 views
why we use parameter passing technique in C??ORpurpose of using "parameter passing technique"??ORwhat is the advantage of using it in C??