Question
Easy

By default the members of a class are........

1
Public
2
Private
3
Protected
4
All options are wrong
Question Details
Time to Solve: 12
Exam: HTET
Level/Paper: Level 3
Chapter:
Topic:
Correct Answer
Option B
Explanation

The correct option is (2): In C++, which is the language context for this question, the Private access specifier is the default accessibility for all members—both data variables and member functions—declared within a class definition. This is a deliberate design choice that directly enforces the fundamental Object-Oriented Programming (OOP) principle of encapsulation and data hiding. By default, marking members as private means they are only accessible from within the class's…Read More