C++ Constructors Question:
Download Questions PDF

Which constructor function is designed to copy objects of the same class type?

A. Create constructor
B. Object constructor
C. Dynamic constructor
D. Copy constructor

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

Answer:

Option D
Copy constructor

Download C++ Constructors Interview Questions And Answers PDF

Previous QuestionNext Question
How many times a constructor is called in the life-time of an object?

A. Only once
B. Twice
C. Thrice
D. Depends on the way of creation of object
Which of the following statement is correct?

A. Constructor has the same name as that of the class.
B. Destructor has the same name as that of the class with a tilde symbol at the beginning.
C. Both A and B.
D. Destructor has the same name as the first member function of the class.