C++ Constructors Question:

Download Job Interview Questions and Answers PDF

Destructor calls are made in which order of the corresponding constructor calls?

A. Reverse order
B. Forward order
C. Depends on how the object is constructed
D. Depends on how many objects are constructed

C++ Constructors Interview Question
C++ Constructors Interview Question

Answer:

Option A
Reverse order

Download C++ Constructors Interview Questions And Answers PDF

Previous QuestionNext Question
A destructor takes __________ arguments.

A. one
B. two
C. three
D. no
Which of the following gets called when an object goes out of scope?

A. constructor
B. destructor
C. main
D. virtual function