1.

The object ________________(a) Can be passed by reference(b) Can be passed by value(c) Can be passed by reference or value(d) Can be passed with referenceThe question was posed to me in homework.I would like to ask this question from Passing Object to Functions in division Assigning Object, Pointer to Objects, Passing and Returning Object of Object Oriented Programming

Answer»

Correct answer is (c) Can be PASSED by reference or value

The explanation: The OBJECTS can be passed by reference if required to use the same object. The VALUES can be passed so that the main object REMAINS same and no changes are made to it if the function makes any changes to the values being passed.



Discussion

No Comment Found

Related InterviewSolutions