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

What is the difference between Class and Structure?

40 Answers   HP, IBM, Samsung, TCS,


Explain selection sorting. Also write an example.

0 Answers  


Explain function overloading and operator overloading.

0 Answers  


Differentiate between late binding and early binding. What are the advantages of early binding?

0 Answers  


what is an array

20 Answers  


You want to link a c++ program to c functions. How would you do it?

0 Answers  


What is functions syntax in c++?

0 Answers  


Explain the ISA and HASA class relationships. How would you implement each in a class design?

3 Answers  


What is flush programming?

0 Answers  


What is extern c++?

0 Answers  


How many bit combinations are there in a byte?

13 Answers   Intel, Microsoft,


How is modularity introduced in C++?

0 Answers   TCS,


Categories