Answer Posted / achal
the concept of vitual function comes when inheritance is at
work. If the overriden function is not made virtual in base
class , then pointer of derived class will call the funtion
in base class(instead it should have called the one from
derived class.)
this is why we make the function in base as virtual.
| Is This Answer Correct ? | 37 Yes | 6 No |
Post New Answer View All Answers
What are the benefits of polymorphism?
Is data hiding and abstraction same?
What are the three parts of a simple empty class?
Can we override main method?
What is Difference Between Inheritance and creating object and getting data? means Class A extends B{ B.getMethod();} (OR) Class A{ b obj=new B(); obj.getMethod(); }
can we make game by using c
What is for loop and its syntax?
Why is oop useful?
What is the purpose of polymorphism?
What does and I oop mean in text?
Can main method override?
what is graphics
What is polymorphism and its types?
write a program that takes input in digits and display the result in words from 1 to 1000
What is protected in oop?