Base class derived in protected mode - Inheritance

Q.  When base class is derived in protected mode, then_____________ .

1. public members of base class become private members of derived class.
2. public members of base class become protected members of derived class.
3. public members of base class become public members of derived class.
4. protected members of base class become protected members of derived class.
5. protected members of base class become private members of derived class.
6. protected members of base class become public members of derived class.

- Published on 17 Jul 15

a. Only 1, 5
b. Only 1, 6
c. Only 2, 6
d. Only 2, 4

ANSWER: Only 2, 4
 

    Discussion

  • Nihal   -Posted on 08 Oct 15
    When base class is derived in protected mode, then public members of base class become protected members of derived class and protected members of base class become protected 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.)