The name of default access specifier for the member function or data members…
2026
The name of default access specifier for the member function or data members in the C++ is:
- A.
Protected
- B.
Depends on compiler
- C.
Public
- D.
Private
Attempted by 103 students.
Show answer & explanation
Correct answer: D
In C++, the default access specifier for data members and member functions defined within a class is private. This means they are not accessible from outside the class unless explicitly declared as public or protected.