← Quiz: Copy Constructor and Deep Copy: all 10 questions
Quiz: Copy Constructor and Deep Copy · Question 6 of 10
What does the rule of three say?
What does the rule of three say?
- A.A class should have at most three constructors
- B.If you need a custom destructor, copy constructor or copy assignment, you probably need all three
- C.Every class needs three member variables
- D.Use three levels of inheritance at most
Answer & explanation
Correct answer: If you need a custom destructor, copy constructor or copy assignment, you probably need all three
They all exist because the class manages a resource by hand.
Can you get the rest right without peeking?
Take the timed Quiz: Copy Constructor and Deep Copy quiz free. Pass it to earn XP and count towards your certificate.
Start the quiz →