Google News
logo
CPP - Quiz(MCQ)
Which of the following describes the protected access specifier?
A)
The variable is visible everywhere
B)
The variable is not visible to its block
C)
The variable is visible only outside inside the block
D)
The variable is visible to its block and to it’s derived class

Correct Answer :   The variable is visible to its block and to it’s derived class


Explanation : Protected members are visible to its block and to the derived classes and not visible to outside objects or variables.

Advertisement