Cpp Inheritance MCQs 5

State whether the following statements about inheritance are True or False. i) A public member of a class can be accessed by its own objects using the dot operator. ii) While inheriting, the private members of the base class will never become the members of its derived class.

A. True, False
B. False, True
C. True, True
D. False, False

In inheritance, order of execution of base class and derived class destructors are:

A. Base to derived
B. Derived to base
C. Random order
D. None of the above

What is the difference between protected and private access specifiers in inheritance?

A. Private member is not inheritable and not accessible in derived class.
B. Protected member is inheritable and also accessible in derived class.
C. Both are inheritable but private is accessible in the derived class.
D. Both are inheritable but protected is not accessible in the derived class.

base class and derived class relationship comes under

A. Inheritance
B. Polymorphism
C. encapsulation
D. None

The friend functions and the member functions of a friend class can directly access the______________ data.

A. Private and protected
B. Private and public
C. Protected and public
D. Private, protected and public