Golgappa.net | Golgappa.org | BagIndia.net | BodyIndia.Com | CabIndia.net | CarsBikes.net | CarsBikes.org | CashIndia.net | ConsumerIndia.net | CookingIndia.net | DataIndia.net | DealIndia.net | EmailIndia.net | FirstTablet.com | FirstTourist.com | ForsaleIndia.net | IndiaBody.Com | IndiaCab.net | IndiaCash.net | IndiaModel.net | KidForum.net | OfficeIndia.net | PaysIndia.com | RestaurantIndia.net | RestaurantsIndia.net | SaleForum.net | SellForum.net | SoldIndia.com | StarIndia.net | TomatoCab.com | TomatoCabs.com | TownIndia.com
Interested to Buy Any Domain ? << Click Here >> for more details...


What is a 'pure' virtual function and what's its use?



What is a 'pure' virtual function and what's its use?..

Answer / phool chand

A pure virtual function is signified by using `=0;' in place of the body of the function. The presence of a pure virtual function prevents instantiation of the class which contains it. For this to be of any use, a derived class must implement the pure virtual function. I.e. the derived class must provide a function with the same name which includes a function body.

The basic reason for pure virtual functions is to specify something that a class can do without specifying how the class will do it.

Is This Answer Correct ?    0 Yes 0 No

Post New Answer

More C++ General Interview Questions

How to change constant values?

6 Answers   Huawei, Symphony,


What is vector processing?

0 Answers  


What is the error in the code below and how should it be corrected?

0 Answers  


What is singleton class in c++?

0 Answers  


What is c++ and its uses?

0 Answers  


What are the conditions that have to be met for a condition to be an invariant of the class?

1 Answers  


What is the difference between an external iterator and an internal iterator?

0 Answers  


What type of question are asked in GE code writing test based on c++ data structures and pointers?

0 Answers  


What are the syntactic rules to be avoid ambiguity in multiple inheritance?

0 Answers  


What are multiple inheritances (virtual inheritance)?

0 Answers  


What function initalizes variables in a class: a) Destructor b) Constitutor c) Constructor

0 Answers  


Is there any function that can skip certain number of characters present in the input stream?

0 Answers  


Categories