Golgappa.net | Golgappa.org | BagIndia.net | BodyIndia.Com | CabIndia.net | CarsBikes.net | CarsBikes.org | CashIndia.net | ConsumerIndia.net | CookingIndia.net | DataIndia.net | DealIndia.net | EmailIndia.net | FirstTablet.com | FirstTourist.com | ForsaleIndia.net | IndiaBody.Com | IndiaCab.net | IndiaCash.net | IndiaModel.net | KidForum.net | OfficeIndia.net | PaysIndia.com | RestaurantIndia.net | RestaurantsIndia.net | SaleForum.net | SellForum.net | SoldIndia.com | StarIndia.net | TomatoCab.com | TomatoCabs.com | TownIndia.com
Interested to Buy Any Domain ? << Click Here >> for more details...


difine hierarchical inheritance.

Answers were Sorted based on User's Feedback



difine hierarchical inheritance...

Answer / sujatha

hierarchical inheritance:

It is a type of inheritance where one or more derived
classes is derved from common( or one ) base class .


ex:

class A
{
// definition of class A
};


class B : public A //derived from A
{
// definition of class B
};


class C : public A //derived from A

{
// definition of class c
};

Is This Answer Correct ?    134 Yes 22 No

difine hierarchical inheritance...

Answer / devi

Derivation of several classes from a single class i.e.,the
traits of one class may be inherited by more than one
class,is called hierarchical inheritance.

Is This Answer Correct ?    28 Yes 4 No

difine hierarchical inheritance...

Answer / mohit karasanbhai kanani

hierarchical inheritance
Dedination:
One comman class have a two derived class.
Syntax:
class (classname)k /* base class */
{
/*defination of class k*/
};
class (classname)m:public class k /* derive class (here
derive class of class k)*/
{
/*defination of class m*/
};
class (classname)p:public class k /* derive class (here
derive class of class k)*/
{
/*defination of class p*/
};
void main
{
}
note: here class name k,p,m are only for example

Is This Answer Correct ?    23 Yes 5 No

difine hierarchical inheritance...

Answer / mohit k kanani

Hierarchical Inheritance
class kar (base class)
{

}
class moh:public kar (derive class of kar and base class of
leo class)
{
}
class rip:public kar (derive class of kar and base class of
leo class
{
}
class leo:public moh,public rip (derive class of moh class
& rip class)
{
}

Is This Answer Correct ?    23 Yes 8 No

difine hierarchical inheritance...

Answer / vani

base class(super class) is inherited by more than one sub
class(derrived class)is called hiererchical inheritance.
Ex: Base class->1.sub class 1
->2.sub class 2
->3.sub class 3

Is This Answer Correct ?    10 Yes 0 No

difine hierarchical inheritance...

Answer / sivajothi

Hierarchical inheritance:
when many sub classes(Derived classes)inherit from a single base class is known as hierarchical inheritance.

Is This Answer Correct ?    6 Yes 3 No

difine hierarchical inheritance...

Answer / manoj shukla

#include<constream.h>
#include<iostream.h>
class A
{
protected:
char name[20];
};
class B:public A
{
protected:
int age;
};
class C:public A
{
char adress[100];
void getdata()
{
cout<<"enter the name:-";
cin>>name;
cout<<"enter the age:-";
cin>>age;
cout<<"enter the adress:-";
cin>>adress;
}
void show()
{
cout<<"name"<<name<<"\n\n age"<<age<<"\n\nadress:-"<<adress;
getdata();
}
void main()
{
clrscr()
C K;
K.show();
getch();
}

Is This Answer Correct ?    5 Yes 7 No

difine hierarchical inheritance...

Answer / aashi

#include<iostream.h>
class A
{
protected:
char name[20];
};
class B:public A
{
protected:
int age;
};
class C:public A
{
char adress[100];
void getdata()
{
cout<<"enter the name:-";
cin>>name;
cout<<"enter the age:-";
cin>>age;
cout<<"enter the adress:-";
cin>>adress;
}
void show()
{
cout<<"name"<<name<<"\n\n age"<<age<<"\n\nadress:-"<<adress;
getdata();
}
void main()
{
clrscr()
C K;
K.show();
getch();
}

Is This Answer Correct ?    2 Yes 4 No

difine hierarchical inheritance...

Answer / muniba

hirerical means that is a tree like

for e.g

class A
{
//some data and methods
};

class B:class A

{
//some data and methods

};

class C:class B
{

//some data and methods
};

and hirerical inheritance is that inheritance which is a
tree like

grandfather
^
|
father
^
|
son

;)

Is This Answer Correct ?    38 Yes 83 No

Post New Answer

More OOPS Interview Questions

what is polymorpsim? what are its types?

8 Answers  


all about pointers

2 Answers  


i ahve v low % in 12th n BSC which is aroun 50 coz science was imposed on me......nw m doin MCA n my aggregate in above 74%,what shud i say if asked about low previous percentage??????

4 Answers  


How do you make derived class as an abstract class?

1 Answers   Convergys, TCS,


What is encapsulation in ict?

0 Answers  


why constructor cannt be declar virtually? why destructor cannt be overloaded?

2 Answers   Infosys,


difference between abstraction and encapsulation with progarammatic eg. hi,just recently i went for an interview .The interviewer asked what is the difference between abstraction and encapsulation with programmatic eg. I gave the answer as encapsulation mean hiding the relevant data which is not useful for the user, eg a electric fan .hiding the information how the electricity is converted into machanical energy. abtraction showing only the relevant data to the user eg electric fan. it look ,its color ,it design etc only relevant data. Then the interviewer asked me, give me some programmic eg .I Said Let assume a web form having control like textbox,button etc. The user can view textbox,button etc this is the eg of abstraction and when the user click on the button how he is redirected is not known by the user is the eg of the encapsulation. Am I Correct .was the answer given by me is perfect .now i am planing to go for an another interview should i give the same answer.IF not please suggest me a better answer.with some good eg Please help

1 Answers  


What are the 4 pillars of oop?

0 Answers  


What is the differances between a abstract calss and interface

5 Answers   Aviva, Symphony,


What is Hashing and how is it done? Pictorial form?

2 Answers   emc2, Wipro,


WRITE A SIMPLE C++ PROGRAM TO SWAP TWO NOS WITHOUT USING TEMP

2 Answers  


Write pseudo code for push in a stack?

2 Answers   emc2,


Categories