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...


Why pure virtual functions are used if they don't have implementation / When does a pure virtual function become useful?



Why pure virtual functions are used if they don't have implementation / When does a pure virtua..

Answer / hrpynux@gmail.com

A pure virtual function makes it so the base class can not be instantiated, and the derived classes are forced to define these functions before they can be instantiated. This helps ensure the derived classes do not forget to redefine functions that the base class was expecting them to.

Is This Answer Correct ?    0 Yes 0 No

Post New Answer

More C++ General Interview Questions

Can we declare destructor as static? Explain?

3 Answers  


How is computer programming useful in real life?

0 Answers  


Suppose that data is an array of 1000 integers. Write a single function call that will sort the 100 elements data [222] through data [321].

0 Answers  


What are the two shift operators and what are their functions?

0 Answers  


Can notepad ++ run c++?

0 Answers  


what is an array

20 Answers  


What is the array and initializing arrays in c++?

0 Answers  


What is binary object model?

0 Answers  


how many trys can we write in one class

3 Answers   Cap Gemini,


Is java the same as c++?

0 Answers  


what are prototypes

4 Answers   Infosys, TCS,


class X { public: int x; static void f(int z); }; void X::f(int y) {x=y;} What is the error in the sample code above? a) The class X does not have any protected members. b) The static member function f() accesses the non-static z. c) The static member function f() accesses the non-static x. d) The member function f() must return a value. e) The class X does not have any private members.

2 Answers   Quark,


Categories