Intermediate C++
Q49 / 100

What is the Rule of Five in C++11?

Correct! Well done.

Incorrect.

The correct answer is B) If a class needs any of destructor, copy constructor, copy assignment, move constructor, or move assignment, it likely needs all five

B

Correct Answer

If a class needs any of destructor, copy constructor, copy assignment, move constructor, or move assignment, it likely needs all five

Explanation

The Rule of Five extends the Rule of Three (destructor, copy ctor, copy assignment) with move constructor and move assignment, for proper resource management.

Progress
49/100