In case of public inheritance in C++, which of the following correctly represents the accessibility of the data variables from derived class?

1
Private variables: No, Protected variables: Yes, Public variables: Yes
2
Private variables: No, Protected variables: No, Public variables: Yes
3
​Private variables: No, Protected variables: Yes, Public variables: No
4
​Private variables: Yes, Protected variables: No, Public variables: Yes

Sponsored

hivanix.in

Visit

This quiz is brought to you by hivanix.in

🌐 Web App Development

Quick Navigation