CoolInterview.com - World's Largest Collection of Interview Questions
Send Free SMS
 Interview Questions  
 Our Services  


INTERVIEW QUESTIONS LANGUAGES C++ DETAILS
Question :
What do you mean by inheritance?



Category C++ Interview Questions
Rating (4.0) By 1 users
Added on 7/19/2006
Views 1313
Rate it!
Answers:

Inheritance in C++
Recall that inheritance is a means of specifying hierarchical relationships between types

C++ classes? can inherit both data and function members?? from other (parent) classes?

In addition, they inherit the "is a" relationship so that an object of a class? SortedList (which inherits from class? List) can be treated as an object of class? List in most cases

Terminology: "the child (or derived) class? inherits (or is derived from) the parent (or base) class?."



Creating or deriving a new class using another class as a base is called inheritance in C++. The new class created is called a Derived class and the old class used as a base is called a Base class in C++ inheritance terminology.
The derived class will inherit all the features of the base class in C++ inheritance. The derived class can also add its own features, data etc., It can also override some of the features (functions) of the base class, if the function is declared as virtual in base class.



 Posted by: Anitha Murthy    

Contact Anitha Murthy  Contact Anitha Murthy

The process of deriving the old class to the new class is known as inheritance.
Derived class-old class
Base class-new class.



 Posted by: vani    

Contact vani  Contact vani

One class inherit the properties of another class is called Inheritance...



 Posted by: Guru.C    

Contact Guru.C  Contact Guru.C


If you have the better answer, then send it to us. We will display your answer after the approval.
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 the difference between an object and a class?


View Answer
What is encapsulation?


View Answer
what is defference between constructor and destructor


View Answer
Can you explain the term "resource acquisition is initialization?"

View Answer
What is the difference between operator new and the new operator?

View Answer
How can you force instantiation of a template?

View Answer
What is an algorithm (in terms of the STL/C++ standard library)?


View Answer
What is the output of printf ("%d")


View Answer
What will happen if I say delete this


View Answer
Difference between "C structure" and "C++ structure".


View Answer

Please Note: We keep on updating better answers to this site. Subscribe to our newsletter to get notified when better answer is posted.

Notify me when better answer is posted!
Email:

View ALL C++ Interview Questions

User Options
Sponsored Links


Copyright ©2003-2010 CoolInterview.com, All Rights Reserved.
Privacy Policy | Terms and Conditions
Page URL: http://www.coolinterview.com/interview/6139/default.asp?cachecommand=bypass


Download Yahoo Messenger | Placement Papers| FREE SMS | ASP .Net Tutorial | Web Hosting | Free SMS | Dedicated Servers | Joke of the Day

0.86