C++ Constructors Question:
Download Questions PDF

Which of the following statement is correct?

A. A destructor has the same name as the class in which it is present.
B. A destructor has a different name than the class in which it is present.
C. A destructor always returns an integer.
D. A destructor can be overloaded.

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

Answer:

Option A
A destructor has the same name as the class in which it is present.

Download C++ Constructors Interview Questions And Answers PDF

Previous QuestionNext Question
Constructors __________ to allow different approaches of object construction.

A. cannot overloaded
B. can be overloaded
C. can be called
D. can be nested
If the copy constructor receives its arguments by value, the copy constructor would

A. call one-argument constructor of the class
B. work without any problem
C. call itself recursively
D. call zero-argument constructor