1.

How to access a private member function of a class?(a) Using object of class(b) Using object pointer(c) Using address of member function(d) Using class addressThe question was asked in an online quiz.This interesting question is from Private Member Functions topic in division Member Functions & its Types of Object Oriented Programming

Answer»

Right option is (C) Using address of MEMBER FUNCTION

To explain I would say: Even the private member functions can be called outside the class. This is POSSIBLE if address of the function is KNOWN. We can use the address to call the function outside the class.



Discussion

No Comment Found

Related InterviewSolutions