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
 
is java purely oop Language? Infosys 49
Write 7 differences between "Public" function and "Private" function? IBM 2
what is the main difference between sizeof() operator in c and c++   3
what is opps?why it is use in programming language? Wipro 2
Given two strings like x=?hello? and y=?open?, remove any character from string x which is also used in string y, thus making the result x=?hll?. IBM 13
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
Which is faster post increment or pre increment ? and in which cases should u use either - to increase speed? EA-Electronic-Arts 4
which structured data type is not used in c++? 1.union 2.structure 3.string 4.boolean HCL 2
Conversion from a basic type to a class type may be achieved using______________ HCL 5
In what situation factory design patterns,DAO design patterns,singleton design patterns should be applied.?   2
What is Method overloading?   5
In which cases you use override and new base?   2
 
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