

MCQOPTIONS
Saved Bookmarks
This section includes 3 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. |
On which specifier s data, does the size of a class s object depend? |
A. | All the data members are added |
B. | Only private members are added |
C. | Only public members are added |
D. | Only default data members are added |
Answer» B. Only private members are added | |
2. |
Which access specifier should be used in a class where the instances can t be created? |
A. | Private default constructor |
B. | All private constructors |
C. | Only default constructor to be public |
D. | Only default constructor to be protected |
Answer» C. Only default constructor to be public | |
3. |
If class A has add() function with protected access, and few other members in public. Then class B inherits class A privately. Will the user will not be able to call _________ from the object of class B. |
A. | Any function of class A |
B. | The add() function of class A |
C. | Any member of class A |
D. | Private, protected and public members of class A |
Answer» E. | |