1.

If the object is not to be passed to any function but the values of the object have to be used then?(a) The data members should be passed separately(b) The data members and member functions have to be passed separately(c) The values should be present in other variables(d) The object must be passedI had been asked this question in final exam.My doubt is from Passing Object to Functions in division Assigning Object, Pointer to Objects, Passing and Returning Object of Object Oriented Programming

Answer»

Right choice is (a) The data members should be PASSED separately

The best EXPLANATION: The data members can be passed separately. There is no need to pass WHOLE OBJECT, instead we can use the object to pass only the required values.



Discussion

No Comment Found

Related InterviewSolutions