Base class is privately inherited by derived class - Inheritance

Q.  When a base class is privately inherited by the derived class, then_____________ .
- Published on 17 Jul 15

a. protected members of the base class become private members of derived class
b. public members of the base class become private members of derived class
c. both a and b
d. only b

ANSWER: both a and b
 

    Discussion

  • ramesh   -Posted on 08 Oct 15
    When a base class is privately inherited by the derived class, then protected members of the base class become private members of derived class and public members of the base class become private members of derived class.

Post your comment / Share knowledge


Enter the code shown above:

(Note: If you cannot read the numbers in the above image, reload the page to generate a new one.)