1.

How the objects are self-referenced in a member function of that class.(a) Using a special keyword object(b) Using this pointer(c) Using * with the name of that object(d) By passing self as a parameter in the member functionI have been asked this question in class test.Enquiry is from Classes topic in division Source Files, Classes and Operator Overloading in C++ of C++

Answer»

The correct option is (b) Using this POINTER

For explanation: In CLASSES objects are self-referenced using this pointer INSIDE the member functions. for EXAMPLE this->value to access the data member value of that object.



Discussion

No Comment Found

Related InterviewSolutions