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 [पृष्ठ ४४६]