

MCQOPTIONS
Saved Bookmarks
This section includes 6 Mcqs, each offering curated multiple-choice questions to sharpen your Object Oriented Programming Using C++ knowledge and support exam preparation. Choose a topic below to get started.
1. |
Can the derived class be made abstract if multiple inheritance is used? |
A. | No, because other classes must be abstract too |
B. | Yes, if all the functions are implemented |
C. | Yes, if all the methods are predefined |
D. | No, since constructors won t be there |
Answer» E. | |
2. |
Which members can t be accessed in derived class in multiple inheritance? |
A. | Private members of base |
B. | Public members of base |
C. | Protected members of base |
D. | All the members of base |
Answer» B. Public members of base | |
3. |
If all the members of all the base classes are private then _____________ |
A. | There won t be any use of multiple inheritance |
B. | It will make those members public |
C. | Derived class can still access them in multiple inheritance |
D. | Compile time error |
Answer» B. It will make those members public | |
4. |
When multiple inheritance is used, which class object should be used in order to access all the available members of parent and derived class? |
A. | Derived class object |
B. | Parent class objects |
C. | Use Abstract derived class |
D. | Derive a class from derived class |
Answer» B. Parent class objects | |
5. |
How to overcome diamond problem? |
A. | Using alias name |
B. | Using seperate derived class |
C. | Using virtual keyword with same name function |
D. | Can t be done |
Answer» D. Can t be done | |
6. |
If class A inherits class B and class C as class A: public class B, public class C {// class body ;}; , which class constructor will be called first? |
A. | Class A |
B. | Class B |
C. | Class C |
D. | All together |
Answer» C. Class C | |