🎙 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 1 of 10

Which of these is an rvalue?

Which of these is an rvalue?

  1. A.A variable int x
  2. B.An element arr[2] of an array
  3. C.The temporary result of a + b
  4. 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 →