what is multi level inheritance give n example ?
Answers were Sorted based on User's Feedback
Answer / adil jan
The best example is Say we have 3 class
ClassA,ClassB and ClassC.
ClassB is derived from ClassA and ClassC is derived ClassB
this is multi level inheritance.
| Is This Answer Correct ? | 0 Yes | 3 No |
Answer / vidhya
The process of inheriting a new class from the already inherited class is called as multilevel inheritance.
example:
Class A
|
|
Class B
|
|
Class C
| Is This Answer Correct ? | 1 Yes | 4 No |
Answer / desh
A class which is derived from another class and it can also
be derived by an another class is known as multilevel
inheritance.{combination of two or more simple inheritance
in a same program are also called as multilevel inheritance.}
example: hen->chick->egg.
animals
/ \
/ \
herbivorous carnivorous
/ \ / \
goat cow lion snake
| Is This Answer Correct ? | 12 Yes | 19 No |
What is polymorphism give a real life example?
What is virtual destructor? Why?
3 Answers Agile Software, College School Exams Tests, CSC,
What do you mean by inline function?
Program to check whether a word starts with a capital letter or not.
how to tackle technical questions
Why do we use virtual functions?
suppose A is a base class and B is the derved class. Both have a method foo which is defined as a virtual method in the base class. You have a pointer of classs B and you typecast it to A. Now when you call pointer->foo, which method gets called? The next part of the question is, how does the compiler know which method to call?
How to Increment the value of the empid E001 for each and every employee by using the programe?
What is conditional Compilation?
What is a linked list?
why overriding?
Why is it so that we can have virtual constructors but we cannot have virtual destructors?