Skip to main content
Output PredictionC+ C++ Easy+10 XP

Reference vs Copy

What does this print?

C++
int x = 10;
int& ref = x;
ref = 20;
cout << x;

🔮 What is the output?