What do you mean by pure virtual functions in C++? Give an example?



What do you mean by pure virtual functions in C++? Give an example?..

Answer / hrpynux@gmail.com

A pure virtual function is a virtual function in C++ for which we need not to write any function definition and only we have to declare it. It is declared by assigning 0 in the declaration. An abstract class is a class in C++ which have at least one pure virtual function.

Is This Answer Correct ?    0 Yes 0 No

Post New Answer

More C++ General Interview Questions

What are the two types of comments, and how do they differ?

0 Answers  


What is helper in c++?

0 Answers  


If a base class declares a function to be virtual, and a derived class does not use the term virtual when overriding that class, is it still virtual when inherited by a third-generation class?

0 Answers  


sir there is some problem with nokia5130c-2,when we are trying to upload movies from net then there is a error occurred"FORMAT NOT SUPPORTED" bt its all ready in 3gp format.please tell me what i do now?

2 Answers   Nokia,


What is c++ w3school?

0 Answers  






Why for local variables the memory required to hold the variable is allocated from the program stack and for new its allocated from the heap?

1 Answers  


What is OOPs

12 Answers   CA,


Specify different types of decision control statements?

0 Answers  


What is oops in c++?

0 Answers  


What is virtual table?

0 Answers  


What is the Maximum Size that an Array can hold?

55 Answers   Adobe, FutureSoft, HCL, Infosys, Satyam, TCS, Wipro,


What is the identity function in c++? How is it useful?

0 Answers  


Categories