Home
About Us
Contact Us
Bookmark
Saved Bookmarks
Current Affairs
General Knowledge
Chemical Engineering
UPSEE
BSNL
ISRO
BITSAT
Amazon
ORACLE
Verbal Ability
→
Programming
→
ASP Dot net Interview Questions in Programming
→
What is virtual and pure virtual function?
1.
What is virtual and pure virtual function?
Answer»
Virtual Function
Pure Virtual Function
Virtual Function has its definition
HIDDEN
in the Base class
They have no definition in the Base class.
The derived class can
OVERRIDE
the virtual function if required.
In the case of a pure virtual function, the derived class has to override it.
If the derived class fails to override then it has the option to use the virtual function of the base class
It will
THROW
a compilation error if it fails to override pure virtual function.
Show Answer
Discussion
No Comment Found
Post Comment
Related InterviewSolutions
__PHP_Incomplete_Class when do we get this? How to solve this problem?
How to expose private members when JSON encoding an object?
How can you access class members as array indexes?
How to pass out of scope variables to a callback function?
What are promises?
What are generators?
What is a resource? Which functions return/create resource?
Does PHP support event loop? If yes give some example.
What is OPcache?
How does the method overriding work with Traits?
Reply to Comment
×
Name
*
Email
*
Comment
*
Submit Reply
Your experience on this site will be improved by allowing cookies. Read
Cookie Policy
Reject
Allow cookies