0% found this document useful (0 votes)
8 views1 page

Inheritance in Object-Oriented Programming

Uploaded by

simranshaikhh21
Copyright
© All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
8 views1 page

Inheritance in Object-Oriented Programming

Uploaded by

simranshaikhh21
Copyright
© All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd

Chapter: Inheritance

Question Paper – Multiple Choice & Short Answer Questions

Section A: Multiple Choice Questions (MCQs)


1. Which of the following best defines inheritance in object-oriented programming?
A) Using parent class features in child class
B) Copying methods manually
C) Using two unrelated classes
D) Overwriting functions
2. What keyword is used in Python to create inheritance?
A) include
B) extends
C) inherits
D) class Child(Parent)
3. Which type of inheritance allows a child class to inherit from only one parent class?
A) Multiple inheritance
B) Single inheritance
C) Hierarchical inheritance
D) Hybrid inheritance
4. What is the main advantage of using inheritance?
A) Reduces code duplication
B) Increases code size
C) Makes debugging harder
D) None of these
5. Which of these is an example of multiple inheritance?
A) class A(B, C)
B) class A(B)
C) class A
D) class B(A)

Section B: Short Answer Questions


1. Define inheritance and explain its importance in programming.

2. List and explain the four types of inheritance with examples.

3. What is the difference between multiple and multilevel inheritance?

4. Explain the concept of hierarchical inheritance with a simple diagram.

5. What is the syntax of inheritance in Python?

You might also like