Practice mode C++

Which access specifier allows class members to be accessed by derived classes but not by outside code?

Correct answer B. protected

Explanation

Protected members are accessible within the class and its derived classes but are hidden from code outside the class hierarchy.

Report a problem

Answer checked How we write and check questions

Tip: press A, B, C or D to answer, and N for the next question.

Advertisement

Have a question about this answer?

Your email address will not be published. Required fields are marked *

Links and website addresses are not allowed in comments.