Q:

Can a copy constructor accept an object of the same class as a parameter, in place of reference of the object? If No, why not possible?

0

Can a copy constructor accept an object of the same class as a parameter, in place of reference of the object? If No, why not possible?

All Answers

need an explanation for this answer? contact us directly to get an explanation for this answer

Answer:

No. It is specified in the definition of the copy constructor itself. It should generate an error if a programmer specifies a copy constructor with a first argument that is an object and not a reference.

need an explanation for this answer? contact us directly to get an explanation for this answer

total answers (1)

C++ Interview Questions For Experienced

This question belongs to these collections

Similar questions


need a help?


find thousands of online teachers now
Are Constructors and destructors can declare as co... >>
<< Can one constructor of a class call another constr...