oop features
- class: but there is structure and union in c also
- operator overloading : we can write 0.1+3.4 or 1+3 or ‘a’+’b’ this is what , + operator working for integer,float,and for character addition, so it’s one kind of operator overloading?
-
inheritance: in c when we include any file in another file using include like
include<iostream.h>so we are including iostream file in another file by this we are achieving
inheritance also in c.in short my question is for each and every object oriented question i m having some argument so can any one help me to clear all the object oriented features comparison with c language.
c is not a object oriented language but my above arguments proving that, c is also object oriented language
so i want to more pacific about object oriented features comparing with c language.
1 a class is much more then a union or a structure, a class can contains variables AND methods (code] neither a union or a structure can contain logic.
operator overloading is not strictly a oo feature, java does not have operator overloading. your example is a limited overloading, you can not make structA + structB work in c
there is a big difference between loading a library and inheritance. Inheritance allows you to create a sub type that has all the behaviors of the parent and then allows you to modify them or add some more features. You could do this in C but it would be much harder and very complicated
Your understanding of OO concepts seems rather limited, I would read some basic OO tutorials to get the concepts.