Correct Answer (Detailed Explanation is Below)
C.
Both struct and class can contain public and private members
Detailed Explanation
Answer: (C) Both struct and class can contain public and private members
Both struct and class support access specifiers such as public, private, and protected.
The important difference is only their default access level.
For a struct, members are public by default. For a class, members are private by default.
However, a class can explicitly declare public members, and a struct can explicitly declare private or protected members.
Therefore, it is incorrect to say that classes cannot have public data members or that structures cannot have private members.