Question OOP-ENC-0021
EasyIn C++, what is the default access level of members declared in a class?
- A.
protected
- B.
private
- C.
Show answer and explanation
Answer: B
Members of a C++ class are private unless an access specifier says otherwise.
Popular companies
Prepare company by company
Hiring pattern, syllabus, past questions and mocks for each company.
All companiesPractice by subject
Encapsulation question
In C++, what is the default access level of members declared in a class?
protected
private
Answer: B
Members of a C++ class are private unless an access specifier says otherwise.
public
package-private