Question 4
Back to Exercise
What happens to a private data member of the base class in a derived object?
- A It is not part of the derived object
- B It exists in the derived object but cannot be accessed by the derived class's own member functions Correct
- C It becomes protected
- D It becomes public
Correct Answer: Option B
The memory is there (sizeof includes it) and base member functions still use it, but the derived class cannot name it.
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!