1.

Members which are not intended to be inherited are declared as ________________(a) Public members(b) Protected members(c) Private members(d) Private or Protected membersI have been asked this question in homework.Query is from Inheritance in portion Inheritance & its Types of Object Oriented Programming

Answer»

The CORRECT answer is (c) Private members

Easiest explanation - Private access specifier is the most secure access mode. It doesn’t ALLOW members to be INHERITED. Even Private INHERITANCE can only INHERIT protected and public members.



Discussion

No Comment Found

Related InterviewSolutions