what is virtual function?
Answer Posted / aarti ashar
A virtual function is a function member of a class,
declared using the "virtual" keyword. A pointer to a
derived class object may be assigned to a base class
pointer, and a virtual function called through the pointer.
If the function is virtual and occurs both in the base
class and in derived classes, then the right function will
be picked up based on what the base class pointer "really"
points at.
Is This Answer Correct ? | 25 Yes | 6 No |
Post New Answer View All Answers
Can enum be null?
What is polymorphism in oops with example?
What is the types of inheritance?
String = "C++ is an object oriented programming language.An imp feature of oops is classes and objects".Write a pgm to count the repeated words from this scenario?
write a code for this:trailer recordId contains a value other than 99, then the file must error with the reason ‘Invalid RECORD_ID’(User Defined Exception).
What is the main purpose of inheritance law?
What is encapsulation in oops?
Can we create object of abstract class?
What is the diamond problem in inheritance?
What do you mean by overloading?
What is the difference between procedural programming and oops?
What is oops?what is its use in software engineering?
Why interface is used?
What is object and class in oops?
What is difference between multiple inheritance and multilevel inheritance?