MCQOPTIONS
Saved Bookmarks
This section includes 21 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. |
Is it compulsory for all the classes in multilevel inheritance to have constructors defined explicitly if only last derived class object is created? |
| A. | Yes, always |
| B. | Yes, to initialize the members |
| C. | No, it not necessary |
| D. | No, Constructor must not be defined |
| Answer» D. No, Constructor must not be defined | |
| 2. |
Does following code show multiple inheritance? |
| A. | Yes, class C and class D |
| B. | Yes, All together it’s multilevel |
| C. | No, 4 classes are used |
| D. | No, multiple inheritance is used with class A, B and CView Answer |
| Answer» E. | |
| 3. |
In multilevel inheritance, which is the most significant feature of OOP used? |
| A. | Code readability |
| B. | Flexibility |
| C. | Code reusability |
| D. | Code efficiency |
| Answer» D. Code efficiency | |
| 4. |
If all the classes used parameterized constructors and no default constructor then ___________ |
| A. | The object of lower level classes can’t be created |
| B. | Object of lower level classes must call parent class constructors explicitly |
| C. | Object of lower level classes must define all the default constructors |
| D. | Only object of first class can be created, which is first parent |
| Answer» C. Object of lower level classes must define all the default constructors | |
| 5. |
How many abstract classes can be used in multilevel inheritance? |
| A. | Only 1 |
| B. | Only 2 |
| C. | At least one less than number of levels |
| D. | Can’t be used |
| Answer» D. Can’t be used | |
| 6. |
Can abstract classes be used in multilevel inheritance? |
| A. | Yes, always |
| B. | Yes, only one abstract class |
| C. | No, abstract class doesn’t have constructors |
| D. | No, never |
| Answer» B. Yes, only one abstract class | |
| 7. |
All the classes must have all the members declared private to implement multilevel inheritance. |
| A. | True |
| B. | False |
| Answer» C. | |
| 8. |
In multilevel inheritance one class inherits _______________ |
| A. | Only one class |
| B. | More than one class |
| C. | At least one class |
| D. | As many classes as required |
| Answer» B. More than one class | |
| 9. |
What is the minimum number of levels for a implementing multilevel inheritance? |
| A. | 1 |
| B. | 2 |
| C. | 3 |
| D. | 4 |
| Answer» D. 4 | |
| 10. |
Multilevel inheritance allows _________________ in the program. |
| A. | Only 7 levels of inheritance |
| B. | At least 7 levels of inheritance |
| C. | At most 16 levels of inheritance |
| D. | As many levels of inheritance as required |
| Answer» E. | |
| 11. |
Which Class is having highest degree of abstraction in multilevel inheritance of 5 levels? |
| A. | Class at 1st level |
| B. | Class 2nd last level |
| C. | Class at 5th level |
| D. | All with same abstraction |
| Answer» B. Class 2nd last level | |
| 12. |
If there are 3 classes. Class C is derived from class B and B is derived from A, Which class destructor will be called at last if object of C is destroyed. |
| A. | A |
| B. | B |
| C. | C |
| D. | All together |
| Answer» B. B | |
| 13. |
If there are 5 classes, E is derived from D, D from C, C from B and B from A. Which class constructor will be called first if the object of E or D is created? |
| A. | A |
| B. | B |
| C. | C |
| D. | A and B |
| Answer» B. B | |
| 14. |
Which among the following best defines multilevel inheritance? |
| A. | A class derived from another derived class |
| B. | Classes being derived from other derived classes |
| C. | Continuing single level inheritance |
| D. | Class which have more than one parent |
| Answer» C. Continuing single level inheritance | |
| 15. |
CAN_ABSTRACT_CLASSES_BE_USED_IN_MULTILEVEL_INHERITANCE??$ |
| A. | Yes, always |
| B. | Yes, only one abstract class |
| C. | No, abstract class doesn’t have constructors |
| D. | No, never |
| Answer» B. Yes, only one abstract class | |
| 16. |
If all the classes used parameterized constructors and no default constructor then, ___________$ |
| A. | The object of lower level classes can’t be created |
| B. | Object of lower level classes must call parent class constructors explicitly |
| C. | Object of lower level classes must define all the default constructors |
| D. | Only object of first class can be created, which is first parent |
| Answer» C. Object of lower level classes must define all the default constructors | |
| 17. |
How many abstract classes can be used in multilevel inheritance?$ |
| A. | Only 1 |
| B. | Only 2 |
| C. | At least one less than number of levels |
| D. | Can’t be used |
| Answer» D. Can‚Äö√Ñ√∂‚àö√ë‚àö¬•t be used | |
| 18. |
Yes, class C and class D |
| A. | Yes, All together it’s multilevel |
| B. | No, 4 classes are used |
| C. | No, multiple inheritance is used with class A, B and C |
| Answer» D. | |
| 19. |
All the classes must have all the members declared private to implement multilevel inheritance? |
| A. | True |
| B. | False |
| Answer» C. | |
| 20. |
In multilevel inheritance one class inherits ______________? |
| A. | Only one class |
| B. | More than one class |
| C. | At least one class |
| D. | As many classes as required |
| Answer» B. More than one class | |
| 21. |
If all the classes use private inheritance in multilevel inheritance then ______________ |
| A. | It will not be called multilevel inheritance |
| B. | Each class can access only non-private members of its parent |
| C. | Each subsequent class can access all members of previous level parent classes |
| D. | None of the members will be available to any other class |
| Answer» C. Each subsequent class can access all members of previous level parent classes | |