Answer Posted / 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 |
Post New Answer View All Answers
Can private class be inherited?
Write a c++ program to display pass and fail for three student using static member function
What are main features of oop?
What is oops and why we use oops?
What is the problem with multiple inheritance?
Explain the advantages of inheritance.
What is purpose of inheritance?
What do you mean by overloading?
Can we define a class within the interface?
What does and I oop mean?
What is for loop and its syntax?
What is constructor in oop?
What is overloading in oop?
What is difference between inheritance and polymorphism?
Where is pseudocode used?