What is the default access specifier for a base class in C++?
- private
- public
- protected
- internal
In C++, if you don't specify an access specifier for the members of a class, they are implicitly set to private. This means that they can't be accessed or viewed from objects of the class or any derived class unless friends.
Loading...
Related Quiz
- What value does a function with return type void return?
- Which of the following C++ versions introduced the auto keyword for automatic type deduction?
- Which of the following stream classes is suitable for both reading and writing operations?
- How does the short-circuit evaluation work in logical operators?
- What happens if an exception is thrown but not caught in a C++ program?