What is a pure virtual function?
Why is it represented as = 0...how is the internal
implementation for the same

Answers were Sorted based on User's Feedback



What is a pure virtual function? Why is it represented as = 0...how is the internal implementatio..

Answer / vikas

A pure virtual function makes a class abstract.0 is used in
its representation to distinguish it from a normal virtual
function. More at

http://www.cppquestions.com/viewtopic.php?f=26&t=14

Is This Answer Correct ?    3 Yes 0 No

What is a pure virtual function? Why is it represented as = 0...how is the internal implementatio..

Answer / helloworld

I believe pure virtual function is a member function with a
declaration as NULL;
virtual void fun()=0;
Now why zero,since the internal implementation of virtual
function is collection of function pointer ...we intialize
this value of function pointers as NULL.

Is This Answer Correct ?    3 Yes 0 No

What is a pure virtual function? Why is it represented as = 0...how is the internal implementatio..

Answer / viji

A virtual function with a null body is said to be pure
virtual function.
The pure virtual function can be defined later in its
derived class.......

Is This Answer Correct ?    3 Yes 2 No

Post New Answer

More C++ General Interview Questions

if i want cin 12345678910 and cout abcdefghij. so how can i create the program?. example : if i key in 8910 so the answer is ghij.

3 Answers  


What are its advantages and disadvantages of multiple inheritances (virtual inheritance)?

0 Answers  


Will rust take over c++?

0 Answers  


How can you link a c program with a c function?

0 Answers  


Write a program using shift_half( ) function to shift the elements of first half array to second half and vice versa.

0 Answers  


What are manipulators used for?

0 Answers  


What is the difference between "overloading" and "overridding"?

3 Answers  


What does extern mean in a function declaration in c++?

0 Answers  


Difference between an inspector and a mutator

0 Answers  


Refer to a name of class or function that is defined within a namespace?

0 Answers  


How the programmer of a class should decide whether to declare member function or a friend function?

0 Answers  


Is ca high or low level language?

0 Answers  


Categories