Mastering C++: A Comprehensive Quiz Based on 'Thinking in C++

Image Description

Question: 1 / 565

What keyword is used in C++ to declare a function to support late binding?

virtual

In C++, the keyword "virtual" is used to declare a function that supports late binding. This means that the function can be overridden by a derived class and the binding will occur at runtime instead of at compile time. Options B and C are incorrect because they are not valid keywords in C++. Option D, "override", is a valid keyword in C++ but it is used to explicitly indicate that a virtual function is being overridden. It is not the keyword used to declare a function as virtual.

Get further explanation with Examzify DeepDiveBeta

dynamic

late

override

Next Question

Report this question

Subscribe

Get the latest from Examzify

You can unsubscribe at any time. Read our privacy policy