Vidyalelo
Python · Q22

Advanced OOP Concepts

Programming · Python · question 22

Q22

What is the diamond problem in multiple inheritance?

A.
A problem with defining diamond shapes
B.
A problem with multiple inheritance in shapes
C.
A problem with ambiguous method resolution
Answer
D.
A problem with creating classes in diamond shapes

Answer: Option C

Solution

Answer: Option C
Solution:
The diamond problem refers to the ambiguity that arises when a class inherits from two classes that have a common ancestor.