ALLInterview.com :: Home Page            
 Advertise your Business Here     
Browse  |   Placement Papers  |   Company  |   Code Snippets  |   Certifications  |   Visa Questions
Post Question  |   Post Answer  |   My Panel  |   Search  |   Articles  |   Topics  |   ERRORS new
   Refer this Site  Refer This Site to Your Friends  Site Map  Bookmark this Site  Set it as your HomePage  Contact Us     Login  |  Sign Up                      
Google
   
 
Categories >> Software >> Programming Languages >> C++ >> OOPS
 
 


 

 
 STL interview questions  STL Interview Questions (90)
 OOPS interview questions  OOPS Interview Questions (554)
 C++ General interview questions  C++ General Interview Questions (458)
Question
what is multi level inheritance give n example ?
 Question Submitted By :: Wilbur J. Pereira
I also faced this Question!!     Rank Answer Posted By  
 
  Re: what is multi level inheritance give n example ?
Answer
# 1
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..

ClassA
^
|
|
ClassB
^
|
|
ClassC
 
Is This Answer Correct ?    327 Yes 48 No
Roshan P R
 
  Re: what is multi level inheritance give n example ?
Answer
# 2
derived a new class from another derived class.It is known
as multilevel inheritance.
example:
grandfather->father->son.
 
Is This Answer Correct ?    253 Yes 28 No
Aswini.s
 
 
 
  Re: what is multi level inheritance give n example ?
Answer
# 3
A class is derive from a class which is derive from another
class is known as multilevel inheritance.
example-grandpa->papa->son
another example:
class A
{
protected:
int x;
public:
void showA()
{
cout<<"enter a value for x:"<<endl;
cin>>x;
}
};
class B:public A
{
protected:
int y;
public:
void showB()
{
cout<<"enter value for y:";
cin>>y;
}
};
class C:public B
{
public:
void showC()
{
showA();
showB();
cout<<"x*y ="<<x*y;
}
};
void main()
{
C ob1;
ob1.showc();
}
 
Is This Answer Correct ?    251 Yes 35 No
Itishree
 
  Re: what is multi level inheritance give n example ?
Answer
# 4
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..

ClassA
^
|
|
ClassB
^
|
|
ClassC
 
Is This Answer Correct ?    98 Yes 18 No
Mohd Aqeel Ahmed
 
  Re: what is multi level inheritance give n example ?
Answer
# 5
"A type of inheritance in which a class is derived from
another derived class is called multilevel inheritance."

in multilevel inheritace,the members of parent class are
inherited to the child class and the member of child class
are inherited to the grand child class.
for example
class A
^
class B
^
class C
 
Is This Answer Correct ?    62 Yes 9 No
Ansar Ali Gujjar
 
  Re: what is multi level inheritance give n example ?
Answer
# 6
A class is derive from a class which is derived from another
class is known as multilevel inheritance.
example-grandpa->papa->son.
 
Is This Answer Correct ?    45 Yes 11 No
Umesh Kumar Vishwakarma
 
  Re: what is multi level inheritance give n example ?
Answer
# 7
To creat a new class from a base class which is in terms of
derive from another base class is known as multilevel
inheritance.
 
Is This Answer Correct ?    34 Yes 11 No
Ashok Kumar Nayak
 
  Re: what is multi level inheritance give n example ?
Answer
# 8
A->B->C 
Is This Answer Correct ?    26 Yes 11 No
Simran
 
  Re: what is multi level inheritance give n example ?
Answer
# 9
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
Desh
 
  Re: what is multi level inheritance give n example ?
Answer
# 10
when a derived class inherits an already created derived
class ,then it is known as multilevel inheritance.

A->B->C
HERE A IS A BASE CLASS.B IS AN INTERMEDIATE BASE CLASS ,AS
IT PROVIDES A LINK FOR THE INHERITANCE BETWEEN A & C.C IS A
DERIVED CLASS.
EG. GRANDFATHER
|
FATHER
|
CHILD

THE CHAIN IS KNOWN AS INHERITANCE PATH.
 
Is This Answer Correct ?    19 Yes 5 No
Radha
 

 
 
 
Other OOPS Interview Questions
 
  Question Asked @ Answers
 
What are the advantanges of modularity   2
I hv a same function name,arguments in both base class and dervied class, but the return type is different. Can we call this as a function overloading? Explain?   3
what is a binary overloading   2
What is abstraction?   9
what is the difference between a package and a software?   3
There are 2 classes defined as below public class A { class B b; } public class B { class A a; } compiler gives error. How to fix it? Microsoft 3
Which is the best institute in hyderabad for C/C++ and it also has fast track course structure. Wipro 11
1. Strong name 2. how to prevent a class from being inherited 3. delegates 4. default modifier for interface 5. default modifier for class 6. base class for exception 7. diff bet trigger and view in sql 8. how to exchange values from one page to another page 9. can multiple catch block ll be executed at same time 10. can u store different data types in an array & array list 11. when we ll use trigger 12. try,catch,finally usage   2
what is difference b/w object based and object oriented programming language? Infosys 16
what is the difference between containership and inheritence?   1
//what is wrong with the programme?? #include<iostream.h> template <class first> class dd { first i; public: void set(); void print(); }; void dd< first>:: set() { cin>>i; } void dd< first>::print() { cout<<"\n"<<i; } void main() { dd <char>g; g.set(); g.print(); }   1
what is polymorpsim? what are its types?   8
 
For more OOPS Interview Questions Click Here 
 
 
 
 
 


   
Copyright Policy  |  Terms of Service  |  Articles  |  Site Map  |  RSS Site Map  |  Contact Us
   
Copyright 2013  ALLInterview.com.  All Rights Reserved.

ALLInterview.com   ::  KalAajKal.com