Sponsored Links

Interview Questions



INTERVIEW QUESTIONS C++ INHERITANCE IN C++ DETAILS

Question: What do you mean by inheritance?

Answer: Inheritance is the process of creating new classes, called derived classes, from existing classes or<br>base classes. The derived class inherits all the capabilities of the base class, but can add <br>embellishments and refinements of its own.

Category Inheritance in C++ Interview Questions & Answers - Exam Mode / Learning Mode
Rating (0.2) By 9251 users
Added on 10/22/2009
Views 81557
Rate it!

Question: What do you mean by inheritance?

Answer:

Inheritance is the process of creating new classes, called derived classes, from existing classes or<br>base classes. The derived class inherits all the capabilities of the base class, but can add <br>embellishments and refinements of its own. Source: CoolInterview.com


create new classes from base class is called inheritance <br> Source: CoolInterview.com

Answered by: k chelladurai | Date: 4/28/2009 | Contact k chelladurai Contact k chelladurai

inheriting the properices of base class to new class Source: CoolInterview.com

Answered by: kamalakar raju | Date: 6/4/2009 | Contact kamalakar raju Contact kamalakar raju

Inheritance is the capability to inherit the the behaviour of other class into another class. Source: CoolInterview.com

Answered by: Dilip | Date: 7/20/2009 | Contact Dilip Contact Dilip

Unlike composition, which involves creating new objects by combining and connecting other objects, inheritance involves creating new objects by directly acquiring the attributes and behaviors of other objects and then extending or specializing them. Like composition, inheritance is everywhere in real life. You inherited your parents genes, and acquired physical attributes from both of them. Technological products (computers, cell phones, etc…) often inherit features from their predecessors. C++ inherited many features from C, the language upon which it is based, and C itself inherited many of its features from the programming languages that came before it. <br><br>Consider an apple and a banana. Although an apple and a banana are different fruits, both have in common that they are fruits. Because apples and bananas are fruits, anything that is true of fruits is also true of apples and bananas. For example, all fruits have a name, a flavor, and are tangible objects. Thus, apples and bananas also have a name, a flavor, and are tangible objects. Apples and bananas inherit these properties from the concept of fruit because they are fruit. Apples and bananas then define some of these properties in different ways (apples and bananas have different flavors), which is what makes them distinct from each other.<br><br><br><br>The object being inherited from is called the parent or base, and the object doing the inheriting is called the child or derived object. In the above picture, “fruit” is the parent, and both “apple” and “banana” are children. Unlike in composition, where each object has a has-a relationship with it’s subobjects, in inheritance, each child has an is-a relationship with it’s parent. An apple is-a fruit. A triangle is-a shape. Red is-a color.<br><br>By default, the children receive all of the properties of the parents. However, the children are then free to define or redefine inherited properties (bananas have that unique banana flavor), add new properties (eg. bananas add the property of being “starchy”, which is not true of many other fruits), or even hide properties.<br><br>It is possible to define entire hierarchies of objects via inheritance. For example, a square is a rectangle, which is a quadrilateral, which is a shape. A right triangle is a triangle, which is also a shape.<br><br><br><br> Source: CoolInterview.com

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

Inheritance is basically the process in which one object acquires the properties of another object.<br>The derived class can have its own properties but it can acquire the properties of the base class by using inheritance.<br>The basic principle lies here is the reusability of code. Source: CoolInterview.com

Answered by: Vishal Tikku | Date: 9/11/2009 | Contact Vishal Tikku Contact Vishal Tikku

inheritance is the property by which an object inherit the property of other Source: CoolInterview.com

Answered by: jaywant topno | Date: 9/27/2009 | Contact jaywant  topno Contact jaywant topno

Inheritance is one of the concepts of OOP which allows the creation of<br>hierarchical classifications. Using inheritance, you can create a general class that<br>defines traits common to a set of related items. This class may then be inherited by<br>other, more specific classes, each adding only those things that are unique to the<br>inheriting class.<br>In keeping with standard C++ terminology, a class that is inherited is referred to as<br>a base class. The class that does the inheriting is called the derived class.<br>Ref:C++ complete Reference Source: CoolInterview.com

Answered by: Dany | Date: 10/12/2009 | Contact Dany Contact Dany

Inheritance is one of the fundamental mechanisms for code reuse in OOP.It allows new class to be derived from an existing class.New class is called derived class and existing class is known as base class. Source: CoolInterview.com

Answered by: sunita saini | Date: 10/28/2009 | Contact sunita saini Contact sunita saini

1.inheritance is the process of creating new class from an existing class 2. the existing class is called base class and newly created class is called derived class 3.derived class inherits the all the capabilitys of base class and it's own capabilitys Source: CoolInterview.com

Answered by: bhanuprakash | Date: 10/29/2009 | Contact bhanuprakash Contact bhanuprakash

The inheritance means you can derived the property of base class . this will done by : this operator<br><br>examples:<br><br>class base <br>{<br><br>}<br>class derived<br>{<br><br>}<br><br>class base : class derived{} <br>inherit properties of base class <br><br> Source: CoolInterview.com

Answered by: Deepak Sharma | Date: 11/1/2009 | Contact Deepak Sharma Contact Deepak Sharma

inheritance is an featur of oops concept<br>inheritanc means achiving one class qualities to anothe class<br>note:<br>only yhe public and the protected memders can be inherited <br>private members can not be achived by inheritance Source: CoolInterview.com

Answered by: p.ashwini | Date: 11/4/2009 | Contact p.ashwini Contact p.ashwini

Derivation of new classes from existing class to facilitate code reuse is inheritance. It is of 4 types. Source: CoolInterview.com

Answered by: himani | Date: 11/11/2009 | Contact himani Contact himani

inheritance is the special property in c++ where the data member of one class can accesed by other class that is derived class... Source: CoolInterview.com

Answered by: manoj kumar sahoo | Date: 5/4/2010 | Contact manoj kumar sahoo Contact manoj kumar sahoo

class derived another class form existing class, the existing class is known as the parent class<br>or super class, and the derived class is known as the child class. Source: CoolInterview.com

Answered by: ADIL | Date: 5/31/2010 | Contact ADIL Contact ADIL


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 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-2024 CoolInterview.com, All Rights Reserved.
Privacy Policy | Terms and Conditions