

MCQOPTIONS
Saved Bookmarks
This section includes 5 Mcqs, each offering curated multiple-choice questions to sharpen your Technical MCQs knowledge and support exam preparation. Choose a topic below to get started.
1. |
Private members of the class are not inheritable. |
A. | TRUE |
B. | FALSE |
C. | May Be |
D. | Can't Say |
E. | |
Answer» C. May Be | |
2. |
What will be the order of execution of base class constructors in the following method of inheritance. class a: public b, virtual public c {...}; |
A. | b(); c(); a(); |
B. | c(); b(); a(); |
C. | a(); b(); c(); |
D. | b(); a(); c(); |
Answer» C. a(); b(); c(); | |
3. |
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 |
Answer» B. Private and public | |
4. |
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 |
Answer» E. | |
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 |
Answer» D. False, False | |