In case of protected inheritance in C++, which of the following correctly…
2018
In case of protected inheritance in C++, which of the following correctly represents the accessibility of the data variables from second derived class?
Answer: C. Private variables: No, Protected variables: Yes, Public variables: Yes
- A.
Private variables: Yes, Protected variables: Yes, Public variables: Yes
- B.
Private variables: Yes, Protected variables: No, Public variables: Yes
- C.
Private variables: No, Protected variables: Yes, Public variables: Yes
- D.
Private variables: No, Protected variables: No, Public variables: Yes
Attempted by 375 students.
Show answer & explanation
Correct answer: C
Loading lesson…