what is virtual function in c++

Answer Posted / indu

IT'S OVERRIDING A BASE CLASS DEFINITION AT RUN TIME.MEMBER
FUNCTION IN BASE CLASS AND DERIVED CLASS IS SAME. NORMALLY
IT INVOKE THE BASE CLASS DEFINITION IF BOTH FUNCTION NAME
IS SAME.BUT WE NEED TO ACCESS THE DERIVED CLASS DEFINITION
WE GO FOR VIRTUAL FUNCTION

Is This Answer Correct ?    20 Yes 3 No



Post New Answer       View All Answers


Please Help Members By Posting Answers For Below Questions

Why is oop useful?

602


Why can't we have instance(stack) of a class as a member of the same class like eg.Class A{A obj;} as we can have self refential pointer

1618


What exactly is polymorphism?

603


What are the 4 main oop principles?

682


What is abstract class in oops?

598






Can a varargs method be overloaded?

617


Why is static class not inherited?

593


What is pure oop?

597


Why oops is important?

606


Is enum a class?

603


What are the 4 pillars of oop?

670


Why is object oriented programming so hard?

616


What language is oop?

591


What is a superclass in oop?

665


what are the different types of qualifier in java?

1840