In case of public inheritance in C++, which of the following correctly…

PYQ DSSSB 2018

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

  1. A.

    Private variables: Yes, Protected variables: Yes, Public variables: Yes

  2. B.

    Private variables: Yes, Protected variables: No, Public variables: Yes

  3. C.

    Private variables: No, Protected variables: Yes, Public variables: Yes

  4. D.

    Private variables: No, Protected variables: No, Public variables: Yes

Attempted by 1018 students.

Sign up free to check your answer

Sign up free

Explore the full course: Dsssb Tgt Computer Science Paper 2

Loading lesson…