C++20 sections · 1024 units
Open in CourseQuiz: Const References
Understanding restrictions
Check Your Understanding
Which line causes a compiler error? void test(const int& x) { cout << x; int y = x; x = 10; int& r = x; }
- A.x = 10 and int& r = x
- B.int y = x
- C.cout << x
- D.All statements