C++ | Constructors | Question 19

Last Updated :
Discuss
Comments

When a copy constructor may be called?

When an object of the class is returned by value.

When an object of the class is passed (to a function) by value as an argument.

When an object is constructed based on another object of the same class

When compiler generates a temporary object.

All of the above

Share your thoughts in the comments