What is multiple inheritance? Give Example
Answer Posted / hemanth
When 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 ? | 33 Yes | 0 No |
Post New Answer View All Answers
What is inheritance in simple words?
What is difference between inheritance and polymorphism?
Why is oop useful?
What is the example of polymorphism?
What are constructors in oop?
Is react oop?
What are different oops concepts?
Why we use classes in oop?
Get me an image implementation program.
Question: Write a program that prints a paycheck. Ask the program user for the name of the employee, the hourly rate, and the number of hours worked. If the number of hours exceeds 40, the employee is paid “time and a half”, that is, 150 percent of the hourly rate on the hours exceeding 40. Be sure to use stepwi se refine ment and break your solution into several functions. Use the int_name function to print the dollar amount of the check.
What are the advantages of polymorphism?
What does and I oop mean?
What is abstraction in oops?
They started with the brief introduction followed by few basic C++ questions on polumorphism, inheritance and then virtual functions. What is polymorphims? How you will access polymorphic functions in C? How virtual function mechanism works?
What is coupling in oop?