

MCQOPTIONS
Saved Bookmarks
This section includes 4 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. |
If virtual function of base class is redefined in derived class then ________________ |
A. | It must be declared virtual in derived class also |
B. | It may or may not be declared virtual in derived class |
C. | It can must not be declared virtual in derived class |
D. | It must be declared normally in derived class |
Answer» C. It can must not be declared virtual in derived class | |
2. |
It is __________ to redefine the virtual function in derived class. |
A. | Necessary |
B. | Not necessary |
C. | Not acceptable |
D. | Good practice |
Answer» C. Not acceptable | |
3. |
Which is a must condition for virtual function to achieve runtime polymorphism? |
A. | Virtual function must be accessed with direct name |
B. | Virtual functions must be accessed using base class object |
C. | Virtual function must be accessed using pointer or reference |
D. | Virtual function must be accessed using derived class object only |
Answer» D. Virtual function must be accessed using derived class object only | |
4. |
Virtual functions can t be made friend function of other classes. |
A. | True |
B. | False |
Answer» B. False | |