Which data members can be inherited but are private to a class?

Which data members can be inherited but are private to a class?
A. Private
B. Protected
C. Protected and Static
D. Privately inherited
 
Answer: b
Explanation: Static members inheritance also depends on the type of specifier they have. Only the protected members can be inherited but remain private to class. If static members are defined in private access, they won’t be allowed for inheritance.
 

Tìm kiếm

Back
Top