What is virtual function?where and when is it used?

Answer Posted / reshma khan pathan

In object-oriented programming, a virtual function is a
function whose behavior can overridden by a function of
same signature of inherited class.

Is This Answer Correct ?    6 Yes 0 No



Post New Answer       View All Answers


Please Help Members By Posting Answers For Below Questions

What do you mean by overloading?

794


What is polymorphism programming?

843


What is the difference between abstraction and polymorphism?

841


How is polymorphism achieved?

768


What is the point of oop?

854


What is an example of genetic polymorphism?

866


Is this job good for future? can do this job post grduate student?

1905


write a code for this. serial_number contained in the header of the file will be read , if this serial number is less than a previous serial number within a successfully processed file, or is the same as another serial number within a successfully processed file, or if the field contains anything other than 7 digits, then the file must error with the reason ‘Invalid SERIAL_NUMBER’.

1981


Why do we use oop?

823


What is polymorphism in oops with example?

758


What is the main feature of oop?

895


What is inheritance in simple words?

812


What is the fundamental idea of oop?

856


#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

2374


Can destructor be overloaded?

795