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
What is the example of polymorphism?
Why do we use polymorphism in oops?
Why is abstraction used?
What are oops functions?
what type of questions
Where You Can Use Interface in your Project
Where is pseudocode used?
What is the purpose of enum?
What is the point of polymorphism?
Why is polymorphism important in oop?
Which is not an object oriented programming language?
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.
Why it is called runtime polymorphism?
What does it mean when someone says I oop?
What is overloading in oop?