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 (91)
 OOPS interview questions  OOPS Interview Questions (558)
 C++ General interview questions  C++ General Interview Questions (458)
Question
what is multi level inheritance give n example ?
 Question Submitted By :: OOPS
I also faced this Question!!     Answer Posted By  
 
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 ?    328 Yes 48 No
Roshan P R
 
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
 
 
 
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
 
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
 
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
 
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
 
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
 
Answer
# 8
A->B->C 
Is This Answer Correct ?    26 Yes 11 No
Simran
 
Answer
# 9
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
 
Answer
# 10
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 2 No
Vidhya
 

 
 
 
Other OOPS Interview Questions
 
  Question Asked @ Answers
 
what is the need of abstraction? what is abstraction?what is the abstraction for stack? Verizon 8
1.what are two type of classe members called? 2.what is data hiding and data encapsulation? 3.how do you make a class member visible aouside its class? 4.what is the default visibility of a class data member? 5.what are the advantages of oop over the structured programing?   6
c++ is a pure object oriented programming or not? Wipro 5
create a c++ program that will accepts 9 inputs using 3 by 3 array.   1
why freind function takes more parameter than normal member function in c++? IBM 1
what is the definition of incapsulation   2
Why do we use virtual functions?   4
can main method be overloaded...??? How..???? Satyam 2
why to use template classes in c++?   1
difference between overloading and overridding   11
20% of a 6 litre solution and 60% of 4 litre solution are mixed what the % of mixture of solution it is resulted into? IonIdea 4
what is SPL in c++.   1
 
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