C++20 sections · 1024 units
Open in CourseQuiz: Classes and Objects Basics
Knowledge check
Check Your Understanding
What happens if you try to access a private member variable from outside the class?
- A.It returns zero or an empty value
- B.It works but prints a warning
- C.It causes a runtime error
- D.It causes a compile-time error