Advertisements
Advertisements
प्रश्न
Suppose, 'Happening' and 'Accident' are two classes. What will happen when Happening class derives from Accident class by using private visibility?
लघु उत्तरीय
उत्तर
- The derived class (Happening) can use public members from the base class (Accident).
- The derived class (Happening) can use protected members from the base class (Accident).
- Private members from the base (Accident) class cannot be utilized in the derived class (Happening).
shaalaa.com
क्या इस प्रश्न या उत्तर में कोई त्रुटि है?
अध्याय 8: Encapsulation and Inheritance - EXERCISES [पृष्ठ ४४६]