asked 103k views
4 votes
Which access specification is typically used for all data members of a class?

A) Public
B) Private
C) Protected
D) Friend

asked
User TheBW
by
8.0k points

1 Answer

4 votes

Final answer:

The access specification typically used for all data members of a class is private.

Step-by-step explanation:

The access specification typically used for all data members of a class is private. The private access specifier restricts access to the data members of a class to only the members of that class. This means that data members declared as private cannot be accessed or modified by code outside the class.

answered
User Snotyak
by
7.4k points

No related questions found