1.

Which is the correct interpretation of the member function call from an object, object.function(parameter);(a) object.function(&this, parameter)(b) object(&function,parameter)(c) function(&object,&parameter)(d) function(&object,parameter)I had been asked this question during a job interview.My question is from This Pointer topic in portion Assigning Object, Pointer to Objects, Passing and Returning Object of Object Oriented Programming

Answer»

Correct ANSWER is (d) function(&object,parameter)

The best explanation: The function name is SPECIFIED first and then the parameter lists. The parameter list is included with the object name along with & symbol. This denotes that the ADDRESS of the object is being PASSED as an argument.



Discussion

No Comment Found

Related InterviewSolutions