Which of the following statements is INCORRECT about copy constructor in C++?
2022
Which of the following statements is INCORRECT about copy constructor in C++?
- A.
It is the constructor that does not accept parameters.
- B.
It is member function of a class.
- C.
It is used to initialise the object by another object.
- D.
It accepts objects of the same class as a reference.
Attempted by 140 students.
Show answer & explanation
Correct answer: A
A copy constructor initializes a new object from an existing one of the same class type. It requires a reference parameter to access that source object data. Consequently, stating it accepts no parameters is false, making Option A the correct selection.