Sponsored Links

Interview Questions



INTERVIEW QUESTIONS C++ INHERITANCE IN C++ DETAILS

Question: What does inheritance means in C++? What are the different forms of inheritance? Give an example for each.

Answer: when a class is derived from another predifined class,then the process of deriving is known as inheritance. different forms of inheritance are single inheritance ,multiple,multilevel, and hierarchical.

Category Inheritance in C++ Interview Questions & Answers - Exam Mode / Learning Mode
Rating (0.3) By 7888 users
Added on 11/22/2013
Views 72855
Rate it!

Question: What does inheritance means in C++? What are the different forms of inheritance? Give an example for each.

Answer:

when a class is derived from another predifined class,then the process of deriving is known as inheritance. different forms of inheritance are single inheritance ,multiple,multilevel, and hierarchical. Source: CoolInterview.com

Answered by: amit kumar | Date: 11/29/2008 | Contact amit kumar Contact amit kumar

Inheritance is the mechanism of class by which we can inherit properties of base class to derived class.The different forms of inheritance are as follows<br>1)Single<br>2)Multiple<br>3)Multilevel<br>4)Multipath<br>5)Hybrid<br>6)Hierarchal Source: CoolInterview.com

Answered by: sulav | Date: 12/1/2008 | Contact sulav Contact sulav

Inheritance is a process to create derived class from executing class.Executing class is called base class.In other ways say the derived class aquires some properties of base class.<br>simple example given below<br>claa abc<br>{<br>protected:<br>int x;<br>int y;<br>};<br>class def:abc<br>{<br>private:<br>int z;<br>public:<br>void display()<br>{<br>x=10;<br>y=20;<br>z=x+y;<br>cout<<z<<"<br>";<br>}<br>};<br>void main()<br>{<br>class def o;<br>o.display();<br>getch();<br>} Source: CoolInterview.com

Answered by: sujit kumar rout | Date: 12/2/2008 | Contact sujit  kumar rout Contact sujit kumar rout

INHERITANCE:Inheritance is the process by which objects of one class acquire the properties of objects of another class & the mechanism of deriving a new class from old class is called inheritance<br>EXAMPLE:<br>polymorphism<br>several types of inheritance:<br>single inheritance:A derived class with one base class is called single inheritance<br>EXAMPLE:<br> A<br> |<br> B<br>multi level inheritance:The mechanism of deriving a class from another 'derived class' is known as multi level inheritance<br>EXAMPLE:<br> A<br> |<br> B<br> |<br> C <br>multiple inheritance:One with several base classes is called multiple inheritance<br>EXAMPLE: <br>A B<br> C <br>hybrid inheritance:One base class deriving more than derived classes is called hybrid inheritance<br>EXAMPLE:<br> A<br>B C<br> D<br>hierarchical inheritance:One class may be inherited more than one base class is called hierarchical inheritance<br>EXAMPLE:<br> A<br>B C D Source: CoolInterview.com

Answered by: muneeswari | Date: 12/2/2008 | Contact muneeswari Contact muneeswari

Inheritance is one of the feature of C++.It means inheriting new form from existing one. Here existing class is called base class and new class is derived class. Derived class contain few features of base classes. Types are multiple, multilevel,single,hybrid inheritance. If a is base class and b is derived from a then it is single inheritance. If v and c are derived and d i derived from b as well as c then it is hybrid. if b is taken from a c from b then it is multilevel. If b c r derived from a then it is multiple. Source: CoolInterview.com

Answered by: neha choudhari | Date: 12/5/2008 | Contact neha choudhari Contact neha choudhari

Inheritance is a situation in which a class derived a set of attributes and related behavior from a parent class. Source: CoolInterview.com

Answered by: manvendra | Date: 12/9/2008 | Contact manvendra Contact manvendra

Inheritance is the process in which objects of one class acquires the property of another class. <br><br>There are 5 types of inheritance:<br>1)single inheritance.<br>2)multiple inheritance.<br>3)multi-level inheritance.<br>4)hybrid inheritance.<br>5)hierarchical inheritance. Source: CoolInterview.com

Answered by: Arvind | Date: 12/16/2008 | Contact Arvind Contact Arvind

Inheritance is a process by which objects of one class acquire the properties of objects of another class.It supports HIERARCHICAL classification as well as it provides RE USABILITY. This means that we can add additional features to an existing class without modifying it.<br><br>In C++ terminology a class that inherited is refer to as a base class. The class that does inheriting is called a derived class. Further a derived class can use as a base class to another class.<br><br>Inheritance is what that separates abstract data type (ADT) progarming from OO programing. Source: CoolInterview.com

Answered by: Priyankush Roy | Date: 4/8/2009 | Contact Priyankush Roy Contact Priyankush Roy

inheritance means the process of accessing the property of one class through objects to another class.it is one of the important concept of oops..any language which support inheritance +data bynding is known as object oriented programming language.there are 5 types of inheritance.<br>1.single inheritance<br>2.multiple inheritance<br>3.multilevel inheritance<br>4. hierarchical<br>5.hybrid<br> Source: CoolInterview.com

Answered by: sreepriya | Date: 11/8/2009 | Contact sreepriya Contact sreepriya

Modern object oriented language that supports the features such as <br>Hiding<br>Inheritance<br>Polyphormism<br>Virtual functions<br>Inheritance is one of the most important key concept in c++.The mechanism of deriving a new class from an old one is called inheritance or derivation. Source: CoolInterview.com

Answered by: lovepreetsidhu | Date: 11/29/2009 | Contact lovepreetsidhu Contact lovepreetsidhu

Inheritance is one of the feature of C++.It means inheriting new form from existing one. Here existing class is called base class and new class is derived class.inheritance is a process in which the function of the object of derived class can access the funcnality of the function of the object of another class . which is knewn as base class.there are following form of inheritance-<br>1.single inheritance<br>2.multiple inheritance<br>3.multilevel inheritance<br>4. hierarchical<br>5.hybrid<br><br><br> Source: CoolInterview.com

Answered by: ashish saxena | Date: 4/5/2010 | Contact ashish saxena Contact ashish saxena


If you have the better answer, then send it to us. We will display your answer after the approval.
Rules to Post Answers in CoolInterview.com:-
  • There should not be any Spelling Mistakes.
  • There should not be any Gramatical Errors.
  • Answers must not contain any bad words.
  • Answers should not be the repeat of same answer, already approved.
  • Answer should be complete in itself.
Name :*
Email Id :*
Answer :*
Verification Code Code Image - Please contact webmaster if you have problems seeing this image code Not readable? Load New Code
Process Verification Enter the above shown code: *
Inform me about updated answers to this question

Related Questions
View Answer
what are the advantages and disadvantages of inheritance?
View Answer
Why Call by reference technique is used in case of Copy constructor & not call by value?
View Answer
What is the difference between composition and inheritance?
View Answer
What Is The Use of VirtualDestructer?
View Answer
Is there any way to write a class such that no class can be inherited from it. Please include code

View Answer
What do you mean by inheritance?


View Answer
class A()
{
};

int main()
{
A a;
}

Whether there will be a default constructor provided by the compiler in above case ?


View Answer
what is the use of volatile keyword? Give me one example?

View Answer
it possible to inherit the private member in drived class?

View Answer
Can you prevent your class from being inherited and becoming a base class for some other classes?
View Answer
Can you allow class to be inherited, but prevent the method from being over-ridden?
View Answer
Can you inherit multiple interfaces?
View Answer
If a base class has a bunch of overloaded constructors, and an inherited class has another bunch of overloaded constructors, can you enforce a call from an inherited constructor to an arbitrary base constructor?
View Answer
What do you mean by inheritance?
View Answer
What is RTTI?
View Answer

Please Note: We keep on updating better answers to this site. In case you are looking for Jobs, Pls Click Here Vyoms.com - Best Freshers & Experienced Jobs Website.

View All Inheritance in C++ Interview Questions & Answers - Exam Mode / Learning Mode



User Options
India News Network

Latest 20 Questions
Payment of time- barred debt is: (a) Valid (b) Void (c) Illegal (d) Voidable
Consideration is defined in the Indian Contract Act,1872 in: (a) Section 2(f) (b) Section 2(e) (c) Section 2(g) (d) Section 2(d)
Which of the following is not an exception to the rule, "No consideration, No contract": (a) Natural love and affection (b) Compensation for involuntary services (c) Completed gift (d) Agency
Consideration must move at the desire of: (a) The promisor (b) The promisee (c) The promisor or any other party (d) Both the promisor and the promisee
An offer which is open for acceptance over a period of time is: (a) Cross Offer (b) Counter Offer (c) Standing Offer (d) Implied Offer
Specific offer can be communicated to__________ (a) All the parties of contract (b) General public in universe (c) Specific person (d) None of the above
_________ amounts to rejection of the original offer. (a) Cross offer (b) Special offer (c) Standing offer (d) Counter offer
A advertises to sell his old car by advertising in a newspaper. This offer is caleed: (a) General Offer (b) Special Offer (c) Continuing Offer (d) None of the above
In case a counter offer is made, the original offer stands: (a) Rejected (b) Accepted automatically (c) Accepted subject to certain modifications and variations (d) None of the above
In case of unenforceable contract having some technical defect, parties (a) Can sue upon it (b) Cannot sue upon it (c) Should consider it to be illegal (d) None of the above
If entire specified goods is perished before entering into contract of sale, the contract is (a) Valid (b) Void (c) Voidable (d) Cancelled
______________ contracts are also caled contracts with executed consideration. (a) Unilateral (b) Completed (c) Bilateral (d) Executory
A offers B to supply books @ Rs 100 each but B accepts the same with condition of 10% discount. This is a case of (a) Counter Offer (b) Cross Offer (c) Specific Offer (d) General Offer
_____________ is a game of chance. (a) Conditional Contract (b) Contingent Contract (c) Wagering Contract (d) Quasi Contract
There is no binding contract in case of _______ as one's offer cannot be constructed as acceptance (a) Cross Offer (b) Standing Offer (c) Counter Offer (d) Special Offer
An offer is made with an intention to have negotiation from other party. This type of offer is: (a) Invitation to offer (b) Valid offer (c) Voidable (d) None of the above
When an offer is made to the world at large, it is ____________ offer. (a) Counter (b) Special (c) General (d) None of the above
Implied contract even if not in writing or express words is perfectly _______________ if all the conditions are satisfied:- (a) Void (b) Voidable (c) Valid (d) Illegal
A specific offer can be accepted by ___________. (a) Any person (b) Any friend to offeror (c) The person to whom it is made (d) Any friend of offeree
An agreement toput a fire on a person's car is a ______: (a) Legal (b) Voidable (c) Valid (d) Illegal



Fresher Jobs | Experienced Jobs | Government Jobs | Walkin Jobs | Company Profiles | Interview Questions | Placement Papers | Companies In India | Consultants In India | Colleges In India | Exams In India | Latest Results | Notifications In India | Call Centers In India | Training Institutes In India | Job Communities In India | Courses In India | Jobs by Keyskills | Jobs by Functional Areas

Testing Articles | Testing Books | Testing Certifications | Testing FAQs | Testing Downloads | Testing Interview Questions | Testing Jobs | Testing Training Institutes

Gate Articles | Gate Books | Gate Colleges | Gate Downloads | Gate Faqs | Gate Jobs | Gate News | Gate Sample Papers | Gate Training Institutes

MBA Articles | MBA Books | MBA Case Studies | MBA Business Schools | MBA Current Affairs | MBA Downloads | MBA Events | MBA Notifications | MBA FAQs | MBA Jobs
MBA Job Consultants | MBA News | MBA Results | MBA Courses | MBA Sample Papers | MBA Interview Questions | MBA Training Institutes

GRE Articles | GRE Books | GRE Colleges | GRE Downloads | GRE Events | GRE FAQs | GRE News | GRE Training Institutes | GRE Sample Papers

IAS Articles | IAS Books | IAS Current Affairs | IAS Downloads | IAS Events | IAS FAQs | IAS News | IAS Notifications | IAS UPSC Jobs | IAS Previous Question Papers
IAS Results | IAS Sample Papers | IAS Interview Questions | IAS Training Institutes | IAS Toppers Interview

SAP Articles | SAP Books | SAP Certifications | SAP Companies | SAP Study Materials | SAP Events | SAP FAQs | SAP Jobs | SAP Job Consultants
SAP Links | SAP News | SAP Sample Papers | SAP Interview Questions | SAP Training Institutes |




Copyright ©2003-2025 CoolInterview.com, All Rights Reserved.
Privacy Policy | Terms and Conditions