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

Consider the code segment class A { private : int a ; public : int b ; protected : int c ; }; class B : A { }; class C : public B { }; The derived class C would contain the members

  1. a, b and c
  2. b and c only
  3. b only
  4. none



Answer: 
Option b: b and c only

Explanation Here

Post a Comment

0 Comments