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


INTERVIEW QUESTIONS LANGUAGES C++ DETAILS
Question :
what is abstractor in c++?

Posted by: vamsi krishna on 10/22/2007

Contact vamsi krishna  Contact vamsi krishna
Category C++ Interview Questions
Rating (4.9) By 25 users
Added on 10/22/2007
Views 6724
Rate it!
Answers:

An abstract class is a class that is designed to be specifically used as a base class. An abstract class contains at least one pure virtual function. You declare a pure virtual function by using a pure specifier (= 0) in the declaration of a virtual member function in the class declaration.

The following is an example of an abstract class:

class AB {
public:
virtual void f() = 0;
};

Function AB::f is a pure virtual function. A function declaration cannot have both a pure specifier and a definition. For example, the compiler will not allow the following:

struct A {
virtual void g() { } = 0;
};

You cannot use an abstract class as a parameter type, a function return type, or the type of an explicit conversion, nor can you declare an object of an abstract class. You can, however, declare pointers and references to an abstract class.



 Posted by: bari    

Contact bari  Contact bari

An abstract class is a class that is designed to be specifically used as a base class. An abstract class contains at least one pure virtual function. You declare a pure virtual function by using a pure specifier (= 0) in the declaration of a virtual member function in the class declaration.

The following is an example of an abstract class:

class AB {
public:
virtual void f() = 0;
};

Function AB::f is a pure virtual function. A function declaration cannot have both a pure specifier and a definition. For example, the compiler will not allow the following:

struct A {
virtual void g() { } = 0;
};

You cannot use an abstract class as a parameter type, a function return type, or the type of an explicit conversion, nor can you declare an object of an abstract class. You can, however, declare pointers and references to an abstract class.



 Posted by: Bari    

Contact Bari  Contact Bari

Abstract is a word used to tell that the class definition or the function definition is incomplete and the class which is going to inherit that class should define that class virtual function.



 Posted by: Chaitanya    

Contact Chaitanya  Contact Chaitanya

Hiding the internal implementation details is known as the abstraction



 Posted by: sivakumarreddy    

Contact sivakumarreddy  Contact sivakumarreddy

Abstraction is one of the basic concept of Object oriented programming which emphasises on hiding the details & focusing on main part.



 Posted by: Pratibha Bharti    

Contact Pratibha Bharti  Contact Pratibha Bharti

abstraction is process in which the
programmer has to focus the required
element of the class.



 Posted by: Dharmendra    

Contact Dharmendra  Contact Dharmendra


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
I want a program on INLINE function and demonstrate the program with INLINE function and without INLINE function.Because i want to know clearly the difference between INLINE FUNCTION AND FUNCTION
View Answer
What is a friend function & its advantage?
View Answer
Where we use reference and where we use pointers ?Write their differences and advantages and disadvantages .
View Answer
what are the disadvantages of copy constructor??
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/12353/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.71