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

Answer Posted / 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



Post New Answer       View All Answers


Please Help Members By Posting Answers For Below Questions

What will happen if a pointer is deleted twice?

809


What is c++ runtime?

735


How is new() different from malloc()?

738


Explain selection sorting. Also write an example.

683


What are the new features that iso/ansi c++ has added to original c++ specifications?

678






What is the function of I/O library in C++ ?

761


What is null pointer and void pointer and what is their use?

679


What are guid?

796


What is a unnitialised pointer?

650


What's the order in which the local objects are destructed?

918


How is c++ different from java?

671


What is the main function c++?

696


What is the cout in c++?

658


Define a nested class. Explain how it can be useful.

737


Why can templates only be implemented in the header file?

750