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
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 |
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 |
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 |
What is the average salary of a c++ programmer?
Define copy constructor.
What happens when the extern "c" char func (char*,waste) executes?
What is an action class?
What is the default access level?
Is there a new/delete equivalent of realloc?
What programming language should I learn first?
What do you mean by inheritance in c++? Explain its types.
Explain the difference between abstract class and interface in c++?
which operator is used for performing an exponential operation a) > b) ^ c) none
What is the word you will use when defining a function in base class to allow this function to be a polimorphic function?
Can inline functions have a recursion? Give the reason?