OOPS
August 29, 2024
OOPS
August 29, 2024
OOPS
August 29, 2024
OOPS
August 29, 2024

OOPS

Question 97
If a class C is derived from class B, which is derived from class A, all through public inheritance, then a class C member function can access
A
only protected and public data of C and B
B
Only protected and public data of C
C
all data of C and private data of A and B
D
public and protected data of A and B and all data of C
Question 97 Explanation: 
→ It is nothing but multilevel inheritance.
→ If a class C is derived from class B, which is derived from class A, all through public inheritance, then a class C member function can access public and protected data of A and B and all data of C
Correct Answer: D
Question 97 Explanation: 
→ It is nothing but multilevel inheritance.
→ If a class C is derived from class B, which is derived from class A, all through public inheritance, then a class C member function can access public and protected data of A and B and all data of C

Leave a Reply

Your email address will not be published. Required fields are marked *