

MCQOPTIONS
Saved Bookmarks
This section includes 19 Mcqs, each offering curated multiple-choice questions to sharpen your Object Oriented Programming knowledge and support exam preparation. Choose a topic below to get started.
1. |
Overloading operators are possible only by using hybrid inheritance. |
A. | True |
B. | False |
Answer» C. | |
2. |
The sequence of destructors being called while using hybrid inheritance is ____________ |
A. | Reverse of constructors being called |
B. | Reverse of classes being made |
C. | Reverse of objects being created |
D. | Reverse of code calling objects |
Answer» B. Reverse of classes being made | |
3. |
If hybrid inheritance is used, it mostly shows _______________ feature of OOP. |
A. | Flexibility |
B. | Reusability |
C. | Efficiency |
D. | Code readability |
Answer» C. Efficiency | |
4. |
If object of lowest level class is created (last derived class) ________________ of its parent class constructors are called. |
A. | Few |
B. | All |
C. | Only parent and parent |
D. | Base and Derived |
Answer» D. Base and Derived | |
5. |
What is the minimum number of classes to be there in a program implementing hybrid inheritance? |
A. | 2 |
B. | 3 |
C. | 4 |
D. | No limit |
Answer» E. | |
6. |
What is the maximum number of classes allowed in hybrid inheritance? |
A. | 7 |
B. | 127 |
C. | 255 |
D. | As many as required |
Answer» E. | |
7. |
If hierarchical inheritance requires to inherit more than one class to single class, which syntax is correct? (A, B, C are class names) |
A. | hierarchical class A: public B, public C |
B. | multiple class A: public B, public C |
C. | many class A: public B, public C |
D. | class A: public B, public C |
Answer» E. | |
8. |
The private member’s are made public to all the classes in inheritance. |
A. | True |
B. | False |
Answer» C. | |
9. |
Which type of inheritance must be used so that the resultant is hybrid? |
A. | Multiple |
B. | Hierarchical |
C. | Multilevel |
D. | None |
Answer» E. | |
10. |
Which amongst the following is true for hybrid inheritance? |
A. | Constructor calls are in reverse |
B. | Constructor calls are priority based |
C. | Constructor of only derived class is called |
D. | Constructor calls are usual |
Answer» E. | |
11. |
If __________________ inheritance is done continuously, it is similar to tree structure. |
A. | Hierarchical |
B. | Multiple |
C. | Multilevel |
D. | Hierarchical and Multiple |
Answer» B. Multiple | |
12. |
Diamond problem includes ____________________ hybrid inheritance. |
A. | Hierarchical and Multiple |
B. | Hierarchical and Hierarchical |
C. | Multiple and Multilevel |
D. | Single, Hierarchical and Multiple |
Answer» B. Hierarchical and Hierarchical | |
13. |
If single inheritance is used with class A and B. A is base class. Then class C, D and E where C is base class and D is derived from C, then E is derived from D. Class C is made to inherit from class B. Which is the resultant type? |
A. | Single level |
B. | Multilevel |
C. | Hybrid |
D. | Multiple |
Answer» C. Hybrid | |
14. |
How many types of inheritance should be used for hybrid? |
A. | Only 1 |
B. | At least 2 |
C. | At most two |
D. | Always more than 2 |
Answer» C. At most two | |
15. |
Which among the following best defines the hybrid inheritance? |
A. | Combination of two or more inheritance types |
B. | Combination of same type of inheritance |
C. | Inheritance of more than 7 classes |
D. | Inheritance involving all the types of inheritance |
Answer» B. Combination of same type of inheritance | |
16. |
IF_HIERARCHICAL_INHERITANCE_REQUIRES_TO_INHERIT_MORE_THAN_ONE_CLASS_TO_SINGLE_CLASS,_WHICH_SYNTAX_IS_CORRECT?_(_A,B,C_ARE_CLASS_NAMES_)?$ |
A. | hierarchical class A: public B, public C |
B. | multiple class A: public B, public C |
C. | many class A: public B, public C |
D. | class A: public B, public C |
Answer» E. | |
17. |
What is the minimum number of classes to be there in a program implementing hybrid inheritance?$ |
A. | 2 |
B. | 3 |
C. | 4 |
D. | No limit |
Answer» E. | |
18. |
What is the maximum number of classes allowed in hybrid inheritance?$ |
A. | 7 |
B. | 127 |
C. | 255 |
D. | As many as required |
Answer» E. | |
19. |
The private member’s are made public to all the classes in inheritance?# |
A. | True |
B. | False |
Answer» C. | |