C++ Programming :: Objects and Classes - Discussion
8 / 41
All the public members of a base class becomes protectedc member of the derived classThis happen in
AVirtual inheritance
Bprotected inheritance
Cprivate inheritance
Dpublic inheritance
Show Explanation
There are 3 access specifiers in c++. Public, Private and Protected.
Public members are accessible outside the class through an object of the class.
Protected members are also accessible outside the class but only from the class which derived it.All public members of a base class becomes protected members of the derived class.
Private members can not be accessed from outside the class.
In Private inheritance, all public and protected members of base class becomes private to the derived class and can be accessible.
Asked In ::
There are 3 access specifiers in c++. Public, Private and Protected.
Public members are accessible outside the class through an object of the class.
Protected members are also accessible outside the class but only from the class which derived it.All public members of a base class becomes protected members of the derived class.
Private members can not be accessed from outside the class.
In Private inheritance, all public and protected members of base class becomes private to the derived class and can be accessible.
Read Full Answer
Report Error
Please Login First Click Here