1.

Which member can never be accessed by inherited classes?(a) Private member function(b) Public member function(c) Protected member function(d) All can be accessedI have been asked this question in an international level competition.My query is from Private Member Functions in chapter Member Functions & its Types of Object Oriented Programming

Answer»

Correct OPTION is (a) Private member function

To explain: The private member FUNCTIONS can never be accessed in the derived classes. The ACCESS specifiers is of MAXIMUM security that allows only the MEMBERS of self class to access the private member functions.



Discussion

No Comment Found

Related InterviewSolutions