A virtual function provides you with the ability to have sev

A virtual function provides you with the ability to have several different functions with the same name in a parent and children classes and have C++ figure out which one to call at run-time. does anyone know the answer? true or false?

Solution

Answer: TRUE

Reason: if the associates of function are with similar class name in both derived and base class ,the virtual function offers the ability to convene the associate with discrete class by a similar function convene based on the conditions.

1.In polymorphism we can overload the functions and operators.

2.To compel a function virtual a keyword virtual is used beside a function.

A virtual function provides you with the ability to have several different functions with the same name in a parent and children classes and have C++ figure out

Get Help Now

Submit a Take Down Notice

Tutor
Tutor: Dr Jack
Most rated tutor on our site