What is the difference between virtual functions and pure virtual functions?

Answer Posted / hrpynux@gmail.com

A virtual function is a member function of base class which can be redefined by derived class. A pure virtual function is a member function of base class whose only declaration is provided in base class and should be defined in derived class otherwise derived class also becomes abstract.

Is This Answer Correct ?    0 Yes 0 No



Post New Answer       View All Answers


Please Help Members By Posting Answers For Below Questions

What are the general quetions are in DEna bank manager IT/System interviews?

1552


What is the problem with multiple inheritance?

597


Why do we use inheritance?

637


#include #include #include #include void insert(char *items, int count); int main(void) { char s[255]; printf("Enter a string:"); gets(s); insert(s, strlen(s)); printf("The sorted string is: %s.\n", s); getch(); return 0; } void insert(char *items, int count) { register int a, b; char t; for(a=1; a < count; ++a) { t = items[a]; for(b=a-1; (b >= 0) && (t < items[b]); b--) items[b+1] = items[b]; items[b+1] = t; } } design an algorithm for Insertion Sort

2183


What is purpose of inheritance?

653






Explain the difference between realloc() and free() in c++?

550


What are the sizes and ranges of the basic c++ data types?

602


List different attributes in C++?

651


What is a null tree?

642


What is the most powerful coding language?

628


What is difference between class and structure in c++?

633


What is different in C++, compare with unix?

623


Write about the retrieval of n number of objects during the process of delete[]p?

582


Explain what happens when a pointer is deleted twice?

749


When should we use container classes instead of arrays?

592