What is the main purpose of inheritance in OOP?OOP में इनहेरिटेंस का मुख्य उद्देश्य क्या है?
OOP में इनहेरिटेंस का मुख्य उद्देश्य क्या है?
Show answerHide answer
Correct answer: (C) To establish a parent-child relationship between classesक्लास के बीच पैरेंट-चाइल्ड रिलेशनशीप स्थापित करना
Explanation
Inheritance creates a parent-child (is-a) relationship, so a subclass reuses and extends the members of its parent class.Inheritance पैरेंट-चाइल्ड (is-a) संबंध बनाती है, जिससे सबक्लास अपने पैरेंट क्लास के सदस्यों को दोबारा उपयोग और विस्तारित करती है।