C++ Constructors Question:
Download Questions PDF

Which of the following statement is correct whenever an object goes out of scope?

A. The default constructor of the object is called.
B. The parameterized destructor is called.
C. The default destructor of the object is called.
D. None of the above.

Answer:

Option C
The default destructor of the object is called.

Download C++ Constructors Interview Questions And Answers PDF

Previous QuestionNext Question
Which of the following statement is correct about constructors?

A. A constructor has a return type.
B. A constructor cannot contain a function call.
C. A constructor has no return type.
D. A constructor has a void return type.
A constructor that accepts __________ parameters is called the default constructor.

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