C++ MQCs with Explanation (CHAPTER 8: INHERITANCE : EXTENDING CLASSES

Which of the following statements is TRUE, when a derived class D inherits a base class B using protected specifier?

  1. public members of B become protected members of D
  2. public members of B become public members of D
  3. public members of B become private members of D
  4. public members are not inherited



Answer: 
Option a: public members of B become protected members of D

Explanation Here

Post a Comment

0 Comments