When a class B is inherited publicly from a class A, then the protected members of class A will become _______ in class B. 

  • public 
  • private 
  • protected 
  • static
When inheritance in C++ is public, the protected members of the base class (Class A in this context) remain protected in the derived class (Class B). This ensures that they are accessible within Class B but not outside of it.
Add your answer
Loading...

Leave a comment

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