Question 8
Back to Exercise
Which code can access a protected member of class Base?
- A Any code
- B Member functions of Base and of classes derived from Base (and friends) Correct
- C Only main()
- D Only Base's constructors
Correct Answer: Option B
protected sits between public and private: hidden from outside code, visible to derived classes.
Discussion & Comments 0
Share your method, a shortcut, or ask about a step you didn't follow.
No comments yet. Be the first to share your solution!