what is virtual function?
Answers were Sorted based on User's Feedback
Answer / bhupendra singh
virtual function can be used to override the propertis of a
function.it is part of polymerphism.it is normaly used in inheritance.
| Is This Answer Correct ? | 0 Yes | 0 No |
Answer / prashant kalmodiya
VIRTUAL FUNCTION ensures that correct function get called
at runtime
| Is This Answer Correct ? | 3 Yes | 4 No |
Answer / sandeep kumar
a virtual function is a member function that you expect to be redefined in derived class when you refer to a derived class object using a pointer or a reference to the base class, you can call a virtual function for the object and executes the derived class version of the function
| Is This Answer Correct ? | 0 Yes | 1 No |
Answer / susanta samal
virtual function is used to prevent from more times
calling.That means if a function is declared as virtual
then its def will be diferent in base class & derived class
| Is This Answer Correct ? | 4 Yes | 7 No |
Answer / ori
(this answer is more - a "use of virtual function")
One Important use of virtual function is - Aggregation of
object related to derivation class hirarcy, in to an other
class , by defining a pointer to the base class (of
hirarchy) as one of the member objects of the other class.
| Is This Answer Correct ? | 2 Yes | 5 No |
Answer / varsha vilas kalebag
virtual function is ended with null
virtual function=o
| Is This Answer Correct ? | 26 Yes | 132 No |
What is polymorphism in oops?
What will happen when the following code is run: int x; while(x<100) { cout<<x; x++; } 1) The computer will output "0123...99" 2) The computer will output "0123...100" 3) The output is undefined
How many types of access specifier in c# and vb.net?
What are the advantages of polymorphism?
how to tackle technical questions
1. Define a class.
what is a ststic variable and stiticfunction briefly explain with exmple and in which case we use
write a c++ program to find maximum of two numbers using inline functions.
Plese get me a perfect C++ program for railway/airway reservation with all details.
what is the virtual function overhead, and what is it used for ? i hope i can get and appropriate answers, thanks a lot....
what is the difference between function template and template of function?explain with example.
What is the difference between Home and $Home?