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 |
Why do we need pointers?
what is the C++
Why the usage of pointers in C++ is not recommended ?
What number of digits that can be accuratly stored in a float (based on the IEEE Standard 754)? a) 6 b) 38 c) An unlimited number
write a program that will produce the ff. output. "what fruit will you buy? 1)apple 2)orange 3)mango ENTER CHOICE (1,2 or 3)> HOW MANY WILL YOU BUY?> THAT WILL COST XX.XX
What is problem with Runtime type identification?
What is enum class in c++?
Write some differences between an external iterator and an internal iterator? Describe the advantage of an external iterator.
Difference between declaration and definition of a variable.
Is std :: string immutable?
Write a program to swap 2 chars without using a third varable? char *s = "A"; char *p = "B";
What is data structure in c++?