

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. |
In multi-level inheritance(all public), the public members of parent/superclass will ________ |
A. | Will continue to get inherited subsequently |
B. | Will not be inherited after one subclass inheritance |
C. | Will not be available to be called outside class |
D. | Will not be able to allocated with any memory space |
Answer» B. Will not be inherited after one subclass inheritance | |
2. |
If a class doesn t have public members, then________ |
A. | None of its members will be able to get inherited |
B. | None of its instance creation will be allowed |
C. | None of its member function can be called outside the class |
D. | None of its data members will be able to get initial value |
Answer» D. None of its data members will be able to get initial value | |
3. |
A class has its default constructor defined as public. Class B inherits class A privately. The class ___________ |
A. | B will not be able to have instances |
B. | Only A can have instances |
C. | Only B can have instances |
D. | Both classes can have instances |
Answer» E. | |
4. |
If the members have to be accessed from anywhere in the program and other packages also, which access specifier should be used? |
A. | Public |
B. | Private |
C. | Protected |
D. | Default |
Answer» B. Private | |