C++ Programming - Constructors and Destructors

Why C++ Programming Constructors and Destructors?

In this section you can learn and practice C++ Programming Questions based on "Constructors and Destructors" and improve your skills in order to face the interview, competitive examination and various entrance test (CAT, GATE, GRE, MAT, Bank Exam, Railway Exam etc.) with full confidence.

Where can I get C++ Programming Constructors and Destructors questions and answers with explanation?

IndiaBIX provides you lots of fully solved C++ Programming (Constructors and Destructors) questions and answers with Explanation. Solved examples with detailed answer description, explanation are given and it would be easy to understand. All students, freshers can download C++ Programming Constructors and Destructors quiz questions with answers as PDF files and eBooks.

Where can I get C++ Programming Constructors and Destructors Interview Questions and Answers (objective type, multiple choice)?

Here you can find objective type C++ Programming Constructors and Destructors questions and answers for interview and entrance examination. Multiple choice and true or false type questions are also provided.

How to solve C++ Programming Constructors and Destructors problems?

You can easily solve all kind of C++ Programming questions based on Constructors and Destructors by practicing the objective type exercises given below, also get shortcut methods to solve C++ Programming Constructors and Destructors problems.

Exercise :: Constructors and Destructors - General Questions

1. 

A constructor that accepts __________ parameters is called the default constructor.

A. one
B. two
C. no
D. three

Answer: Option C

Explanation:

No answer description available for this question. Let us discuss.

2. 

What happens when a class with parameterized constructors and having no default constructor is used in a program and we create an object that needs a zero-argument constructor?

A. Compile-time error.
B. Preprocessing error.
C. Runtime error.
D. Runtime exception.

Answer: Option A

Explanation:

No answer description available for this question. Let us discuss.

3. 

Can a class have virtual destructor?

A. Yes
B. No

Answer: Option A

Explanation:

No answer description available for this question. Let us discuss.

4. 

Destructor has the same name as the constructor and it is preceded by ______ .

A. !
B. ?
C. ~
D. $

Answer: Option C

Explanation:

No answer description available for this question. Let us discuss.

5. 

For automatic objects, constructors and destructors are called each time the objects

A. enter and leave scope
B. inherit parent class
C. are constructed
D. are destroyed

Answer: Option A

Explanation:

No answer description available for this question. Let us discuss.

1 2 3 4 5 6 7 8 Next »