answersLogoWhite

0

Why is multiple inheritance not possible in C?

Updated: 8/16/2019
User Avatar

Wiki User

8y ago

Best Answer

C is not object-oriented -- you can't even use single inheritance let alone multiple inheritance.

User Avatar

Wiki User

9y ago
This answer is:
User Avatar
More answers
User Avatar

Wiki User

8y ago

C is not an object oriented language.

This answer is:
User Avatar

Add your answer:

Earn +20 pts
Q: Why is multiple inheritance not possible in C?
Write your answer...
Submit
Still have questions?
magnify glass
imp
Related questions

How you possible multiple inheritance in java?

Actually, java does not support multiple inheritance. You can achieve partial multiple inheritance using interfaces but java is not like C or C++ where you can do direct multiple inheritance. However, you can achieve partial multiple inheritance with the help of interfaces. Ex: public class FerrariF12011 extends Ferrari implements Car, Automobile {…} And this is under the assumption that Car and Automobile are interfaces. Here if you see, though you don't inherit concrete code from the Car or the Automobile interface, you do inherit skeleton methods that determine the way your class eventually behaves and hence this can be considered partial Multiple Inheritance


How ploymorphism and inheritance is different from that in Java and c plus plus?

C++ allows multiple inheritance while Java does not. In my opinion, multiple inheritance is not useful because it can get very confusing very quick. For polymorphism, C++ does early binding by default, while Java does late binding by default. Late binding is more useful than early binding.


How do you create multiple inheritance in c?

You don't. Inheritance is a feature of object oriented programming languages. C is not object oriented.


What is problem in multiple inheritance?

Java does not support direct multiple Inheritance. Harder to implement, not every language support it: C++ does, Java does not.


Why do object-oriented programmers oppose using multiple inheritence?

Not all of them do; C++ uses multiple inheritance.The designers of Java decided to do away with several aspects of C++ that may cause confusion, this includes multiple inheritance, pointers, and several other aspects.The possible confusion with multiple inheritance arises when both parents have a method or field with the same name. Which one to use in the child?To have some of the benefits of multiple inheritance, Java supports interfaces instead. A class can implement multiple interfaces.


What is multiple inheritence in c?

C is not object oriented and therefore has no concept of inheritance of any kind.


How does inheritance support multiple inheritance in java in example?

Actually, java does not support multiple inheritance. You can achieve partial multiple inheritance using interfaces but java is not like C or C++ where you can do direct multiple inheritance. However, you can achieve partial multiple inheritance with the help of interfaces. Ex: public class FerrariF12011 extends Ferrari implements Car, Automobile {…} And this is under the assumption that Car and Automobile are interfaces. Here if you see, though you don't inherit concrete code from the Car or the Automobile interface, you do inherit skeleton methods that determine the way your class eventually behaves and hence this can be considered partial Multiple Inheritance.


What is multiple inheritance in java?

Actually, java does not support multiple inheritance. You can achieve partial multiple inheritance using interfaces but java is not like C or C++ where you can do direct multiple inheritance. However, you can achieve partial multiple inheritance with the help of interfaces. Ex: public class FerrariF12011 extends Ferrari implements Car, Automobile {…} And this is under the assumption that Car and Automobile are interfaces. Here if you see, though you don't inherit concrete code from the Car or the Automobile interface, you do inherit skeleton methods that determine the way your class eventually behaves and hence this can be considered partial Multiple Inheritance.


Drawbacks of multiple inheritance in c plus plus?

There are no drawbacks to multiple inheritance if multiple inheritance is precisely what is required to achieve your goal. If there are any drawbacks then it is only because of poor design, not multiple inheritance itself. For instance, when designing classes to simulate vehicles, an amphibious vehicle would inherit the properties of both an off-road vehicle and a marine vehicle, therefore multiple inheritance would be an appropriate usage.


Can you use multiple inheritance in .NET?

Multiple inheritance in C# In C#, the classes are only allowed to inherit from a single parent class, which is called single inheritance. But you can use interfaces or a combination of one class and interface(s), where interface(s) should be followed by class name in the signature.


How interface supports indirect multiple inheritance in java?

Actually, java does not support multiple inheritance. You can achieve partial multiple inheritance using interfaces but java is not like C or C++ where you can do direct multiple inheritance. However, you can achieve partial multiple inheritance with the help of interfaces. Ex: public class FerrariF12011 extends Ferrari implements Car, Automobile {…} And this is under the assumption that Car and Automobile are interfaces. Here if you see, though you don't inherit concrete code from the Car or the Automobile interface, you do inherit skeleton methods that determine the way your class eventually behaves and hence this can be considered partial Multiple Inheritance


Can we implement multiple inheritance in java using package and interface?

Yes. Java does not support full fledged/proper multiple inheritance. But, whatever partial inheritance that Java supports can be implemented using interfaces Actually, java does not support multiple inheritance. You can achieve partial multiple inheritance using interfaces but java is not like C or C++ where you can do direct multiple inheritance. However, you can achieve partial multiple inheritance with the help of interfaces. Ex: public class FerrariF12011 extends Ferrari implements Car, Automobile {…} And this is under the assumption that Car and Automobile are interfaces. Here if you see, though you don't inherit concrete code from the Car or the Automobile interface, you do inherit skeleton methods that determine the way your class eventually behaves and hence this can be considered partial Multiple Inheritance.