Question.3
Which of these calls the copy constructor and which calls the copy assignment operator?
Buffer a(10); Buffer b = a; // Line 1 Buffer c(20); c = a; // Line 2
Select Answer
Both call the copy constructor
Line 1 calls the copy constructor (creating a new object); Line 2 calls the copy assignment operator (updating an existing object)
Both call the assignment operator
Line 1 calls assignment; Line 2 calls the copy constructor