180k views
0 votes
A(n) ________ is a special function that is called whenever a new object is created and initialized with another object's data.

User SILENMUS
by
4.2k points

1 Answer

6 votes

Answer: Copy constructor

Explanation: Copy constructor is the constructor that is used for the creation of the objects and then initializing it along with the same class object. It basically works on the function of initialization of same type of objects .

When there is no initialization in the class of the copy constructor , then it automatically function and initializes the same type object itself.

User Garima Tiwari
by
5.4k points