1.

Which among the following is inherited by a derived class from base class?(a) Data members only(b) Member functions only(c) All the members except private members(d) All the members of base classI have been asked this question during an online interview.Enquiry is from Derived Class in portion Classes of Object Oriented Programming

Answer»

Correct choice is (C) All the members except private members

To explain: The class inheriting another class, inherits all the data members and MEMBER functions that are not private. This is done to ENSURE the SECURITY features with maximum FLEXIBILITY.



Discussion

No Comment Found

Related InterviewSolutions