What is Pure Virtual Function? Why and when it is used ?

Answer Posted / guest

The abstract class whose pure virtual method has to be
implemented by all the classes which derive on these.
Otherwise it would result in a compilation error.
This construct should be used when one wants to ensure that
all the derived classes implement the method defined as
pure virtual in base class.

Is This Answer Correct ?    77 Yes 44 No



Post New Answer       View All Answers


Please Help Members By Posting Answers For Below Questions

How the delete operator differs from the delete[]operator?

738


Which format specifier is used for printing a pointer value?

665


If there are two catch statements, one for base and one for derived, which should come first?

662


Write about c++ storage classes?

866


Explain function overloading

666






Difference between declaration and definition of a variable.

709


What are static type checking?

716


When do we use copy constructors?

685


What does the following code do: int c=0; cout< a) Undefined *Updated* b) 01 c) 00

717


Is it possible to have a recursive inline function in c++?

657


Write a program in C++ for Fibonacci series

756


How long will it take to learn programming?

687


What is a tuple c++?

637


Can the operator == be overloaded for comparing two arrays consisting of characters by using string comparison?

648


Explain shallow copy?

686