C++20 sections · 1024 units
Open in Course

Quiz: Reference Behavior

Predicting results

Check Your Understanding

What prints? int x = 10; int& r1 = x; int& r2 = r1; r2 = 20; cout << x;

  1. A.20
  2. B.10
  3. C.Compiler error
  4. D.Undefined behavior
Start the roadmap to answer the quizzes and solve the challenges