1.

Functions can’t return objects.(a) True(b) FalseI had been asked this question during an interview.My doubt is from Objects in portion OOPs Concept & Features of Object Oriented Programming

Answer»

The correct answer is (b) False

To EXPLAIN: Functions can always return an OBJECT if the return type is same as that of object being RETURNED. Care has to be taken while writing the PROTOTYPE of the function.



Discussion

No Comment Found

Related InterviewSolutions