Practice mode C++

Which C++ keyword allows a base class function to be overridden and resolved at run time?

Correct answer A. virtual

Explanation

Declaring a function virtual enables dynamic binding, so a call through a base class pointer or reference runs the derived class version.

Report a problem

Answer checked How we write and check questions

Tip: press A, B, C or D to answer, and N for the next question.

Advertisement

Have a question about this answer?

Your email address will not be published. Required fields are marked *

Links and website addresses are not allowed in comments.