Which statement about multiple inheritance in C++ is correct?

Options

  • A. A class can inherit from more than one base class
  • B. A class can have only one base class
  • C. Multiple inheritance is impossible in C++
  • D. More than one of the above
  • E. None of the above

Correct Answer (Detailed Explanation is Below)

A. A class can inherit from more than one base class

Detailed Explanation

Answer: A class can inherit from more than one base class

C++ supports multiple inheritance, where a derived class can inherit from two or more base classes.

For example, a class can inherit from both Teacher and Researcher. Multiple inheritance can be useful, but it can also create ambiguity, including the diamond problem.