adplus-dvertising
frame-decoration

Question

Which is must condition for virtual function to achieve runtime polymorphism?

a.

Virtual function must be accessed with direct name

b.

Virtual functions must be accessed using base class object

c.

Virtual function must be accessed using pointer or reference

d.

Virtual function must be accessed using derived class object only

Answer: (c).Virtual function must be accessed using pointer or reference

Engage with the Community - Add Your Comment

Confused About the Answer? Ask for Details Here.

Know the Explanation? Add it Here.

Q. Which is must condition for virtual function to achieve runtime polymorphism?

Similar Questions

Discover Related MCQs

Q. Which among the following is true for virtual functions?

Q. The virtual functions must be declared and defined in _____________ class and overridden in ___________ class.

Q. It is __________ to redefine the virtual function in derived class?

Q. Which among the following best defines the abstract methods?

Q. Which among the following is true ?

Q. How are abstract functions different from the abstract functions?

Q. It is _________________________ to define the abstract functions.

Q. The abstract function definitions in derived classes is enforced at _________

Q. What is this feature of enforcing definitions of abstract function at compile time called?

Q. What is the syntax for using abstract method?

Q. If a function declared as abstract in base class doesn’t have to be defined in derived class then ______

Q. Static methods can’t be made abstract in java.

Q. Which among the following is true?

Q. Which among the following is correct for abstract methods?

Q. If a class have all the abstract methods the class will be known as ___________

Q. The abstract methods can never be ___________ in a base class.

Q. The abstract method definition can be made ___________ in derived class.

Q. How many types of member functions are possible in general?

Q. Simple member functions are ______________________

Q. What are static member functions?