When are copy constructors called?

When are copy constructors called?

There are many important places where a copy constructor is called.
> When an object is created from another object of the same type.
> When an object is passed by value as a parameter to a function.
> When an object is returned from a function.
> when a function returns an object of that class by value.
> when the object of that class is passed by value as an argument to a function.
> when we construct an object based on another object of the same class.
> When compiler generates a temporary object.

By:Umang
Date:2006-01-09 00:00:00

Post Your Answers


User Email:

User Name:
Answers:

Related C Subjective Links

C Subjective interview questions and answers for experienced and fresher