Multiple choice

By default, the members of a structure are __________.

  1. private

  2. public

  3. protected

  4. none of these

Reveal answer Fill a bubble to check yourself
B Correct answer
Explanation

In C++, structures (struct) have public access by default, unlike classes where members are private by default. This is a fundamental distinction between struct and class. Protected is used for inheritance scenarios, and 'none of these' is incorrect since public is the default.