What is Pure Virtual Function? Why and when it is used ?
Answer Posted / harry
pure virtual function declared in the base class.
pure virtual function having intializer=0;
pure virtual function also know as do nothing function &
dummy function.
class contain atleast one pure virtual function.
object cannote be create of that class in which pure
virtual function are declared and that class are know as
abstract class.
| Is This Answer Correct ? | 15 Yes | 4 No |
Post New Answer View All Answers
What is the difference between method overloading and method overriding in c++?
Can comments be nested?
What is diamond problem in c++?
In which situation the program terminates before reaching the breakpoint set by the user at the beginning of the mainq method?
Write about all the implicit member functions of a class?
You have two pairs: new() and delete() and another pair : alloc() and free(). Explain differences between eg. New() and malloc()
How the memory management in vectors are being done. What happens when the heap memory is full, and how do you handle it ?
Explain the difference between struct and class in terms of access modifier.
Is it possible to provide default values while overloading a binary operator?
What are enumerations?
How many types of scopes are there in c++?
Define 'std'.
Can we define a constructor as virtual in c++?
Explain what are the sizes and ranges of the basic c++ data types?
What is the best c++ book for beginners?