15 real Move Semantics questions from the C++ bank, as asked in Indian campus drives and tech interviews. Every question has a verified answer and an AI-tutor explanation on placd — free to start.
1. What is Rvalue reference?
Mid
A.a cast that unconditionally produces an rvalue reference to its argument, signaling that the object's resources may be pilfered
B.passing function arguments to another callable while preserving their value category and constness, typically via std::forward and a forwarding reference
C.an optimization that constructs a returned or temporary object directly in its destination, omitting a copy or move; mandatory for prvalues since C++17
D.a reference type declared with double ampersand that binds to temporaries and movable objects, enabling resource transfer instead of copying
2. Which term means: "a reference type declared with double ampersand that binds to temporaries and movable objects, enabling resource transfer instead of copying"?
A.Rvalue reference — a reference type declared with double ampersand that binds to temporaries and movable objects, enabling resource transfer instead of copying
B.Rvalue reference — a cast that unconditionally produces an rvalue reference to its argument, signaling that the object's resources may be pilfered
C.Rvalue reference — a special member that initializes an object by transferring ownership of another object's resources, leaving the source in a valid but unspecified state
D.Rvalue reference — an optimization that constructs a returned or temporary object directly in its destination, omitting a copy or move; mandatory for prvalues since C++17
A.an optimization that constructs a returned or temporary object directly in its destination, omitting a copy or move; mandatory for prvalues since C++17
B.a special member that initializes an object by transferring ownership of another object's resources, leaving the source in a valid but unspecified state
C.passing function arguments to another callable while preserving their value category and constness, typically via std::forward and a forwarding reference
D.a cast that unconditionally produces an rvalue reference to its argument, signaling that the object's resources may be pilfered
5. Which term means: "a cast that unconditionally produces an rvalue reference to its argument, signaling that the object's resources may be pilfered"?
A.std::move — a special member that initializes an object by transferring ownership of another object's resources, leaving the source in a valid but unspecified state
B.std::move — a reference type declared with double ampersand that binds to temporaries and movable objects, enabling resource transfer instead of copying
C.std::move — a cast that unconditionally produces an rvalue reference to its argument, signaling that the object's resources may be pilfered
D.std::move — an optimization that constructs a returned or temporary object directly in its destination, omitting a copy or move; mandatory for prvalues since C++17
A.a special member that initializes an object by transferring ownership of another object's resources, leaving the source in a valid but unspecified state
B.a reference type declared with double ampersand that binds to temporaries and movable objects, enabling resource transfer instead of copying
C.passing function arguments to another callable while preserving their value category and constness, typically via std::forward and a forwarding reference
D.a cast that unconditionally produces an rvalue reference to its argument, signaling that the object's resources may be pilfered
8. Which term means: "passing function arguments to another callable while preserving their value category and constness, typically via std::forward and a forwarding reference"?
A.Perfect forwarding — passing function arguments to another callable while preserving their value category and constness, typically via std::forward and a forwarding reference
B.Perfect forwarding — a cast that unconditionally produces an rvalue reference to its argument, signaling that the object's resources may be pilfered
C.Perfect forwarding — a reference type declared with double ampersand that binds to temporaries and movable objects, enabling resource transfer instead of copying
D.Perfect forwarding — an optimization that constructs a returned or temporary object directly in its destination, omitting a copy or move; mandatory for prvalues since C++17
A.an optimization that constructs a returned or temporary object directly in its destination, omitting a copy or move; mandatory for prvalues since C++17
B.a special member that initializes an object by transferring ownership of another object's resources, leaving the source in a valid but unspecified state
C.passing function arguments to another callable while preserving their value category and constness, typically via std::forward and a forwarding reference
D.a cast that unconditionally produces an rvalue reference to its argument, signaling that the object's resources may be pilfered
11. Which term means: "an optimization that constructs a returned or temporary object directly in its destination, omitting a copy or move; mandatory for prvalues since C++17"?
A.Copy elision — an optimization that constructs a returned or temporary object directly in its destination, omitting a copy or move; mandatory for prvalues since C++17
B.Copy elision — passing function arguments to another callable while preserving their value category and constness, typically via std::forward and a forwarding reference
C.Copy elision — a reference type declared with double ampersand that binds to temporaries and movable objects, enabling resource transfer instead of copying
D.Copy elision — a cast that unconditionally produces an rvalue reference to its argument, signaling that the object's resources may be pilfered
A.an optimization that constructs a returned or temporary object directly in its destination, omitting a copy or move; mandatory for prvalues since C++17
B.a cast that unconditionally produces an rvalue reference to its argument, signaling that the object's resources may be pilfered
C.a reference type declared with double ampersand that binds to temporaries and movable objects, enabling resource transfer instead of copying
D.a special member that initializes an object by transferring ownership of another object's resources, leaving the source in a valid but unspecified state
14. Which term means: "a special member that initializes an object by transferring ownership of another object's resources, leaving the source in a valid but unspecified state"?
A.Move constructor — an optimization that constructs a returned or temporary object directly in its destination, omitting a copy or move; mandatory for prvalues since C++17
B.Move constructor — a special member that initializes an object by transferring ownership of another object's resources, leaving the source in a valid but unspecified state
C.Move constructor — a reference type declared with double ampersand that binds to temporaries and movable objects, enabling resource transfer instead of copying
D.Move constructor — a cast that unconditionally produces an rvalue reference to its argument, signaling that the object's resources may be pilfered
Answers, AI explanations, and a scored voice mock interview
Sign up free to check your answers with explanations, ask the AI tutor anything on any question, and take one full AI mock interview — scored like a real panel.