FreePrograms


C language is a middle level language. It is a structured language. C language is a case sensitive language. All syntax written in c language is in lower case. C is the basis for C++.
  CONTACT US   ABOUT US   PRIVACY  DISCLAIMER

FREE C PROGRAMS 

What is C C vs C++ vs Java Program Structure Data Types in C Basic Rules of C & C++
Functions in C If, Else Conditions Loops in C Switch Case Arrays
Pointers Structures in C Strings in C Command Line Arguments Type Casting
Linked Lists Recursion Binary Trees Inheritance Multiple Inheritance
Templates File I/O Object Oriented Programming Data Structures in C C interview Questions



Multiple Inheritance : C Language Tutorial

We can derive a class from any number of base classes. Deriving a class from more than one direct base class is called multiple inheritance. It is a feature of Object Oriented Programming.

Inheritance is the process by which new classes called derived classes are created from existing classes called base classes. This process saves time of the programmer because the code can be reused.

For example say we have a base class by name Team ,,,,than India, Australia, England will be its derived classes. This derived class will inherit all the features of the base class in C++ inheritance.

The derived class can also add its own features also.

Example of simple inheritance:

class Team //Sample base class for c++ inheritance
    {
     protected:
        char k[20];
        int n;
     public:
        Team();
        ~Team();
        void a();
        void b();
        void c();
      };
 

     class India: public vehicle //Sample derived class for C++ inheritance
     {
       protected:
          char name;
       public:
          India();
     };

 

COPYRIGHT 2009 ALL RIGHTS RESERVED FREECPROGRAMS.COM