Intermediate C++
Q44 / 100

What is a move constructor?

Correct! Well done.

Incorrect.

The correct answer is B) A constructor that transfers ownership of resources from a temporary (rvalue) object without copying

B

Correct Answer

A constructor that transfers ownership of resources from a temporary (rvalue) object without copying

Explanation

Move constructors (MyClass(MyClass&&)) steal resources from rvalues, enabling efficient transfers without expensive copies (e.g., std::vector reallocation).

Progress
44/100