C++ Programming :: OOPS Concepts - Discussion
Home > C++ Programming > OOPS Concepts > MCQs Questions Discussion
11 / 14
Choose the correct option.
In private inheritance derived class members can access base class members that are
1) Public
2) Private
3) Protected
A1 & 2
B1 & 3
C2 & 3
D1,2 & 3
Answer: Option (Login/Signup)
Show Explanation
Asked In ::
TRICK
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.
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