C++ Programming - Constructors and Destructors - Discussion

Discussion :: Constructors and Destructors - General Questions (Q.No.6)

6. 

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

Answer: Option D

Explanation:

No answer description available for this question.

Prakash said: (Nov 6, 2014)  
Can any one tell me what is actually copy constructor?

Manasvi said: (Jan 5, 2015)  
A copy constructor is a special constructor in the C++ programming language for creating a new object as a copy of an existing object. The first argument of such a constructor is a reference to an object of the same type as is being constructed (const or non-const) , which might be followed by parameters of any type (all having default values).

Asjad Khan said: (Jun 1, 2020)  
A copy constructor is used for creating a new objects as a copy of existing objects. The first arguments of such a constructor is reference to he object of same type as I is being constructed.

Post your comments here:

Name *:

Email   : (optional)

» Your comments will be displayed only after manual approval.