I disagree with all above posts..
Here's what i feel
***************
Inheritance is a mechanism by which new and more specialized classes can be defined in terms of existing classes. When a child class (subclass) inherits from a parent class (superclass), the subclass then includes the definitions of all the attributes and methods that the superclass defines. Usually, the subclass extends the superclass by adding its own attributes and methods. Objects that are instances of the subclass contain all data defined by the subclass and its parent classes, and they are able to perform all operations defined by this subclass and its parents.
This kind of class relationship can be implemented in C by embedding the parent class attribute structure as the first member of the child class structure.structuring results in such an attribute alignment that a pointer to the Child class can always be safely cast (upcast) on the pointer to the Parent class. In particular, this pointer can always be passed to any C function expecting a pointer to the Parent class. (To be strictly correct in C, you should explicitly upcast this pointer.) This means that all methods of parent classes are automatically available to child classes-in other words, they are inherited.
This simple approach works only for single inheritance (one parent class) because a class with many parent classes cannot align attributes with all of those parents.
I've named the inherited member super to make the inheritance relationship between classes more explicit and to increase the similarity to Java. The super member provides a handle to access the superclass attributes. For example, a grandchild class can access its grandparent protected attribute _foo as this-> super.super._foo.
Inheritance adds responsibilities to class constructors and the destructor. Because each child object contains an embedded parent object, the child constructor must take care of initializing the portion controlled by the parent. To avoid any potential dependencies, the superclass constructor should be called before initializing the attributes. Exactly the opposite holds true for the destructor. The inherited portion should be destroyed as the last step.
In my implementation, I also adopt from Java the concept of a single abstract base class Object. This means that no class can be defined as standalone, but rather must extend some other class, with the Object class at the root of the class hierarchy. This setup is especially convenient in this hybrid implementation (OO add-on to a procedural language) because every object can be ultimately treated as the Object class instance-which clearly separates objects from all other types. This differs from the C++ approach, in which each structure is equivalent to a class. As I will demonstrate, my Object class adds important behavior, subsequently inherited by all other classes, thus enabling polymorphism.
Listing 1 shows the declaration of a basic class String extending the class Object. The class encapsulates a character buffer (__buffer), provides two ways of construction (StringCon1, StringCon2), a destructor, and a method for read-only access to the character buffer StringToChar. The class is declared by means of preprocessor macros: CLASS, VTABLE, METHODS, and END_CLASS, which are defined and documented in object.h
so forth visit.....
http://www.embedded.com/97/fe29712.htm