what is virtual function?

Answer Posted / vindhyachal kumar gupta

C++ virtual function is a member function of a class, whose
functionality can be over-ridden in its derived classes. The
whole function body can be replaced with a new set of
implementation in the derived class. The concept of c++
virtual functions is different from C++ Function overloading.
C++ Virtual Function - Properties:

C++ virtual function is,

* A member function of a class
* Declared with virtual keyword
* Usually has a different functionality in the derived class
* A function call is resolved at run-time

Is This Answer Correct ?    0 Yes 0 No



Post New Answer       View All Answers


Please Help Members By Posting Answers For Below Questions

What is the example of polymorphism?

574


Why do we use polymorphism in oops?

593


Why is abstraction used?

624


What are oops functions?

600


what type of questions

1705






Where You Can Use Interface in your Project

1440


Where is pseudocode used?

582


What is the purpose of enum?

591


What is the point of polymorphism?

602


Why is polymorphism important in oop?

646


Which is not an object oriented programming language?

554


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.

2588


Why it is called runtime polymorphism?

592


What does it mean when someone says I oop?

603


What is overloading in oop?

585