1.

Which members can never be accessed in derived class from the base class?(a) Private(b) Protected(c) Public(d) All except privateI have been asked this question in semester exam.This interesting question is from Derived Class in chapter Classes of Object Oriented Programming

Answer»

Right choice is (d) All except PRIVATE

To explain I would SAY: There is no restriction for a DERIVED CLASS to access the members of the base class until and unless the members are private. Private member are declared so that those members are not accessible OUTSIDE the class.



Discussion

No Comment Found

Related InterviewSolutions