1.

Which is more effective while calling the functions?(a) call by value(b) call by reference(c) call by pointer(d) call by objectThe question was asked during an interview.My doubt stems from Function Declarations topic in chapter Functions, Namespaces & Exceptions in C++ of C++

Answer» CORRECT answer is (b) CALL by reference

Explanation: In the call by reference, it will just passes the reference of the memory addresses of passed values rather than copying the value to NEW MEMORIES which reduces the overall time and memory USE.


Discussion

No Comment Found

Related InterviewSolutions