what is virtual function in c++

Answer Posted / sree

virtual function comes into picture while inheriting the
base class functions to the derived class functions.
ifthe virtual isnot used then the pointer of derived class
points to the baseclass function

Is This Answer Correct ?    28 Yes 1 No



Post New Answer       View All Answers


Please Help Members By Posting Answers For Below Questions

What is a class oop?

592


What is interface in oop?

660


What is the highest level of cohesion?

576


What is difference between class and object with example?

562


What is class and example?

567






What does sksksk mean in text slang?

1532


write a program to enter a string like"sunil is a good boy and seeking for a job" not more than 10 characters including space in one line,rest characters should b in other line.if the next line starts from in between the previous word,then print whole word to next line.

1789


what type of question are asked in thoughtworks pair programming round ?

1758


Which language is not a true object oriented programming language?

640


What is the real time example of inheritance?

637


Why is polymorphism needed?

591


Can we override main method?

603


What is the diamond problem in inheritance?

577


What is cohesion in oop?

621


How oops is better than procedural?

583