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

What is an adjust field format flag?

0 Answers  


State the difference between pre and post increment/decrement operations.

0 Answers  


Please explain class & object in c++?

0 Answers  


Floating point representation and output seems to be compiler dependent?

1 Answers  


What is pointer in c++ with example?

0 Answers  


What is the maximum combined length of command line arguments including the space between adjacent arguments?

0 Answers  


Are there any special rules about inlining?

0 Answers  


simple c++ program for "abcde123ba" convert "ab321edcba" with out using string

5 Answers  


Is C++ case sensitive a) False b) Depends on implementation c) True

0 Answers  


Specify different types of decision control statements?

0 Answers  


What is the use of the this pointer?

3 Answers  


Write a C++ program that asks the user to choose a number between 1 and 1000. Then, your program should be able to guess the number by asking the user no more than 10 yes/no questions. Use a while loop in your program

1 Answers  


Categories