C++20 sections · 1024 units
Open in Course

Quiz: Pass by Reference

Function parameter behavior

Check Your Understanding

What does this print? void swap(int& a, int& b) { int t = a; a = b; b = t; } int x = 5, y = 10; swap(x, y); cout << x;

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