9 votes 9 votes Various parameter passing mechanisms have been in used in different programming languages. Which of the following statements is true? Call by value result is used in language Ada. Call by value result is the same as call by name. Call by value is the most robust. Call by reference is the same as call by name. Call by name is the most efficient. Programming in C tifr2011 programming parameter-passing + – makhdoom ghaya asked Oct 22, 2015 edited Aug 17, 2020 by soujanyareddy13 makhdoom ghaya 1.7k views answer comment Share Follow See 1 comment See all 1 1 comment reply Devesh_Kumar commented Nov 4, 2019 reply Follow Share Refer: https://gateoverflow.in/270/parameter-passing-technique 2 votes 2 votes Please log in or register to add a comment.
2 votes 2 votes e. Call by name is the most efficient. http://stackoverflow.com/questions/838079/what-is-pass-by-name-and-how-does-it-work-exactly zambus answered Dec 10, 2015 edited Jul 25, 2021 by soujanyareddy13 zambus comment Share Follow See all 4 Comments See all 4 4 Comments reply Rupendra Choudhary commented Dec 30, 2017 reply Follow Share Hello zambus. I didn't find any reason in the link you provided , that supports the argument of option (e). Explain in detail. 6 votes 6 votes JashanArora commented Feb 27, 2020 reply Follow Share 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 votes 4 votes Arjun commented Feb 27, 2020 reply Follow Share 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 votes 4 votes JashanArora commented Feb 27, 2020 reply Follow Share Yes, Arjun sir, I try to reason out each option while preparing ^_^ 1 votes 1 votes Please log in or register to add a comment.
1 votes 1 votes 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. :) iwasifirshad answered May 2, 2020 edited Jun 22, 2020 by iwasifirshad iwasifirshad comment Share Follow See all 0 reply Please log in or register to add a comment.