Explore topic-wise MCQs in C++ (MCQ) questions and answers.

This section includes 2 Mcqs, each offering curated multiple-choice questions to sharpen your C++ (MCQ) questions and answers knowledge and support exam preparation. Choose a topic below to get started.

1.

Which of the following statements are not true about destructor?1. It is invoked when object goes out of the scope2. Like constructor, it can also have parameters 3. It can be virtual 4. It can be declared in private section5. It bears same name as that of the class and precedes Lambda sign.

A. Only 2, 3, 5
B. Only 2, 3, 4
C. Only 2, 4, 5
D. Only 3, 4, 5
Answer» D. Only 3, 4, 5
2.

Which of the followings are true about constructors?1. A class can have more than one constructor.2. They can be inherited.3. Their address can be referred.4. Constructors cannot be declared in protected section of the class.5. Constructors cannot return values.

A. Only 1,2,4
B. 1,2,4,5
C. 1,3,5
D. 1,4,5
Answer» E.