Question OOP-INH-0057
MediumWhat does the 'protected' keyword on a field allow in C++?
- A.
Access only from the same file
- B.
Access only from friend classes
- C.
Sign up free to see the answer and a step-by-step explanation.
Popular companies
Prepare company by company
Hiring pattern, syllabus, past questions and mocks for each company.
All companiesPractice by subject
Inheritance question
What does the 'protected' keyword on a field allow in C++?
Access only from the same file
Access only from friend classes
Sign up free to see the answer and a step-by-step explanation.
Access from anywhere
Access from the class and its derived classes, but not from outside