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
Recommended Posts:
- C++ | Constructors | Question 12
- C++ | Constructors | Question 5
- C++ | Constructors | Question 6
- C++ | Constructors | Question 7
- C++ | Constructors | Question 4
- C++ | Constructors | Question 8
- C++ | Constructors | Question 14
- C++ | Constructors | Question 3
- C++ | Constructors | Question 17
- C++ | Constructors | Question 15
- C++ | Constructors | Question 16
- C++ | Constructors | Question 9
- C++ | Constructors | Question 17
- C++ | Constructors | Question 13
- C++ | Constructors | Question 1



