Q
What is the default member access in a C++ class and in a C++ struct?
-
A
class: private; struct: public
-
B
class: public; struct: private
-
C
Both private
-
D
Both public
Correct Answer:
A. class: private; struct: public
Explanation:
This default access is the only language-level difference between class and struct in C++.