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 are constructors in oop?

810


What are main features of oop?

880


Why oops is important?

798


What is an example of genetic polymorphism?

883


What is coupling in oop?

786


What does and I oop mean?

852


What is a function in oop?

831


Can we create object of abstract class?

843


What is polymorphism and why is it important?

785


Explain virtual inheritance?

904


How do you answer polymorphism?

805


Write a program to compute for numeric grades for a course. The course records are in a file that will serve as the input file. The input file is in exactly the following format: Each line contains a student's first name, then one space, then ten quiz scores all on one line. The quiz scores are in whole number and are separated by one space. Your program will take it input from this file and sends it output to a second file. The data in the output file will be exactly the same as the data in the input file except that there will be one additional number (of type double) at the end of each line. This number will be the average of the student's ten quiz scores. Use at least one function that has file streams as all or some of its arguments.

2840


What is polymorphism explain?

990


write string class as your own class in java without using any built-in function

2227


Why do we use polymorphism?

777