C++ | Constructors | Question 2

When a copy constructor may be called?
(A) When an object of the class is returned by value.
(B) When an object of the class is passed (to a function) by value as an argument.
(C) When an object is constructed based on another object of the same class
(D) When compiler generates a temporary object.
(E) All of the above

Answer: (E)

Explanation: See When is copy constructor called?

Quiz of this Question

Practice Tags :

Recommended Posts:

1 Average Difficulty : 1/5.0
Based on 1 vote(s)