Multiple choice

In inheritance, when a protected member is inherited in public mode, it becomes ______ in the derived class.

  1. public

  2. private

  3. protected

  4. none of these

Reveal answer Fill a bubble to check yourself
C Correct answer
Explanation

In C++ inheritance, a protected member inherited in public mode remains protected in the derived class. Public inheritance maintains the access level - public members stay public, protected members stay protected, and private members remain inaccessible (though they exist in the derived class). This preserves encapsulation while allowing controlled access in the inheritance hierarchy.