1.

Which access type data gets derived as private member in derived class?(a) Private(b) Public(c) Protected(d) Protected and PrivateI have been asked this question in exam.My question is from Inheritance in portion Inheritance & its Types of Object Oriented Programming

Answer» RIGHT choice is (a) PRIVATE

Explanation: It is a RULE, that when a derived class inherits the BASE class in private access mode, all the MEMBERS of base class gets derived as private members of the derived class.


Discussion

No Comment Found

Related InterviewSolutions