🎙 Free live masterclass · Sun, 29 Nov, 7:00 pm IST · Java Full Stack roadmap Register free →
Skills101
← Quiz: Move Semantics and rvalue References: all 10 questions

Quiz: Move Semantics and rvalue References · Question 8 of 10

Which list is the rule of five?

Which list is the rule of five?

  1. A.Constructor, destructor, getter, setter, operator==
  2. B.Destructor, copy constructor, copy assignment, move constructor, move assignment
  3. C.Five constructors with different parameters
  4. D.new, delete, new[], delete[], malloc
Answer & explanation

Correct answer: Destructor, copy constructor, copy assignment, move constructor, move assignment

A class that manages a raw resource must consider all five special member functions.

Can you get the rest right without peeking?

Take the timed Quiz: Move Semantics and rvalue References quiz free. Pass it to earn XP and count towards your certificate.

Start the quiz →