Which type of inheritance in C++ restricts a derived class from inheriting from more than one base class? 

  • Single inheritance 
  • Multiple inheritance 
  • Hierarchical inheritance 
  • Hybrid inheritance
Single inheritance restricts a derived class to inherit from only one base class. While C++ supports multiple inheritance, where a class can inherit from more than one class, single inheritance ensures there's a straightforward lineage from the base to the derived class, avoiding complexities and potential ambiguities.
Add your answer
Loading...

Leave a comment

Your email address will not be published. Required fields are marked *