MCQOPTIONS
Saved Bookmarks
This section includes 6 Mcqs, each offering curated multiple-choice questions to sharpen your Constructors and Destructors knowledge and support exam preparation. Choose a topic below to get started.
| 1. |
Which one of the following is correct about the statements given below? |
| A. | Only II is correct. |
| B. | Both I and II are correct. |
| C. | Only I is correct. |
| D. | Both I and II are incorrect. |
| Answer» D. Both I and II are incorrect. | |
| 2. |
Which inheritance type is used in the class given below? class A : public X, public Y {} |
| A. | Multilevel inheritance |
| B. | Multiple inheritance |
| C. | Hybrid inheritance |
| D. | Hierarchical Inheritance |
| Answer» C. Hybrid inheritance | |
| 3. |
Which of the following header file includes definition of cin and cout ? |
| A. | istream.h |
| B. | ostream.h |
| C. | iomanip.h |
| D. | iostream.h |
| Answer» E. | |
| 4. |
Which of the following is correct about the statements given below? |
| A. | Only I is true. |
| B. | Both I and II are false. |
| C. | Only II is true. |
| D. | Both I and II are true. |
| Answer» C. Only II is true. | |
| 5. |
Which of the following cannot be used with the keyword virtual ? |
| A. | class |
| B. | member functions |
| C. | constructor |
| D. | destructor |
| Answer» D. destructor | |
| 6. |
Which of the following is the correct class of the object cout ? |
| A. | iostream |
| B. | istream |
| C. | ostream |
| D. | ifstream |
| Answer» D. ifstream | |