Answer the following statements true (T) or false (F)

1) Virtual functions allow old code to call new code.
2) Virtual functions are implemented with a table look up that is done at run time.
3) Late binding refers to a failure to secure one’s ski boots.
4) In a class, functions declared with the virtual keyword need not be defined.
5) The virtual function mechanism binds the “right” function to objects.


1) T
2) T
3) F
4) F
5) T

Computer Science & Information Technology

You might also like to view...

Answer the following statements true (T) or false (F)

1. Most of the lines in a program contain something meaningful; however, some of the lines may contain nothing at all. 2. Before a computer can execute a program written in a high level language, such as C++, it must be translated into object code. 3. Once a value has been stored in a variable it cannot be changed. 4. The purpose of the compiler is to convert object code into source code. 5. If a new value is stored in a variable, it replaces whatever value was previously there.

Computer Science & Information Technology

In the following statement, the characters Hello! are a(n)

cout << "Hello!"; a. variable b. string literal c. comment d. object e. None of these

Computer Science & Information Technology

When const is used at the end of a function prototype (preceding the semicolon), the following are true EXCEPT

A. const must also be placed at the end of the function heading of the corresponding function in the implementation file B. when the function is called from the main program, it is called the same way as if const were not even used C. the returned value must be a literal number instead of the value of a variable D. it can aid in debugging

Computer Science & Information Technology

What attribute do you add to the