What is multiple inheritance? Give Example

Answer Posted / arun

A class is derived from more than one base class, it is
called as multiple inheritance.
Class a {
int b;

public:
void fun();
}
Class C {
int d;

public:
void fun();
}
Class d :public a, public c {
int x;

void fun1();
}
----------

Here class d inherits class a and c, hence multiple inheritance.

Is This Answer Correct ?    0 Yes 0 No



Post New Answer       View All Answers


Please Help Members By Posting Answers For Below Questions

Can a varargs method be overloaded?

802


What is oops?what is its use in software engineering?

748


What is pointer in oop?

719


How can you overcome the diamond problem in inheritance?

948


What is balance factor?

801


What are objects in oop?

816


when to use 'mutable' keyword and when to use 'const cast' in c++

1873


#include #include #include #include void insert(char *items, int count); int main(void) { char s[255]; printf("Enter a string:"); gets(s); insert(s, strlen(s)); printf("The sorted string is: %s.\n", s); getch(); return 0; } void insert(char *items, int count) { register int a, b; char t; for(a=1; a < count; ++a) { t = items[a]; for(b=a-1; (b >= 0) && (t < items[b]); b--) items[b+1] = items[b]; items[b+1] = t; } } design an algorithm for Insertion Sort

2355


Is oop better than procedural?

755


What is multilevel inheritance explain with example?

848


Why is polymorphism needed?

780


What is the main purpose of inheritance law?

923


What is pure oop?

830


Is data hiding and abstraction same?

758


Write a program to sort the number with different sorts in one program ??

2093