← Quiz: Move Semantics and rvalue References: all 10 questions
Quiz: Move Semantics and rvalue References · Question 1 of 10
Which of these is an rvalue?
Which of these is an rvalue?
- A.A variable
int x - B.An element
arr[2]of an array - C.The temporary result of
a + b - D.A reference parameter
int &r
Answer & explanation
Correct answer: The temporary result of a + b
a + b produces a temporary with no name; the others name objects that keep living.
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 →