C++ Programming - Objects and Classes - Discussion

Discussion Forum : Objects and Classes - General Questions (Q.No. 18)
18.
Which of the following statements is correct when a class is inherited privately?
Public members of the base class become protected members of derived class.
Public members of the base class become private members of derived class.
Private members of the base class become private members of derived class.
Public members of the base class become public members of derived class.
Answer: Option
Explanation:
No answer description is available. Let's discuss.
Discussion:
5 comments Page 1 of 1.

Mahesh said:   5 years ago
And for better clearance private data will not inherite to derived class soo c option is wrong.

NecroTrue said:   9 years ago
I think it is, B+C.

Why "C" is not correct?
(1)

Yathartha said:   10 years ago
Why not C option?
(1)

Sudip said:   1 decade ago
Public members of the base class become private members of derived class because here we have flow the private inheritance so data member or data function of base class become private.

Mannu said:   1 decade ago
Public members of the base class become private members of derived class because here we have flow the private inheritance so data member or data function of base class become private.

Post your comments here:

Your comments will be displayed after verification.