1.

Where the temporary objects (created while return by value) are created?(a) Outside the function scope(b) Within the function(c) Inside the main function(d) Inside the calling functionI had been asked this question in quiz.Enquiry is from Returning Objects in division Assigning Object, Pointer to Objects, Passing and Returning Object of Object Oriented Programming

Answer»

Correct ANSWER is (b) Within the function

To explain I would say: The TEMPORARY object are created within the function and are INTENDED to return the VALUE for specific use. EITHER the object can be assigned to another object or be used directly if possible.



Discussion

No Comment Found

Related InterviewSolutions