QUESTIONS AND CORRECT ANSWERS
When you derive a class from an existing class, you ________ add new data and functions -
CORRECT ANSWER may
________ members of a base class are never accessible to a derived class. - CORRECT
ANSWER Private
The compiler performs ________ on virtual functions - CORRECT ANSWER dynamic binding
In the statement,
class car : public vehicle
which is the base class? - CORRECT ANSWER vehicle
These are used to signal errors or unexpected events that occur while a program is running -
CORRECT ANSWER Exceptions
The beginning of a function template is marked by a: - CORRECT ANSWER template prefix
The following statement
class Car : private Vehicle
allows the ________ members of the Car class to access ________ members of the Vehicle class. -
CORRECT ANSWER public, protected
Protected members of a base class are like ________, but they may be accessed by derived
classes. - CORRECT ANSWER private members
, When member functions behave differently, depending upon which object performed the call,
this is an example of ________. - CORRECT ANSWER polymorphism
In the following statement
class car : protected vehicle
what is being protected? - CORRECT ANSWER base class members
The ________ starts with the keyword try, and is followed by a block of code executing any
statements that might cause an exception to be thrown. - CORRECT ANSWER try block
In the following statement
template < class T >
what does T represent? - CORRECT ANSWER a generic data type that is used in a function
template
The try block is immediately followed by one or more ________. - CORRECT ANSWER catch
blocks
A(n) ________ is a class that stores data and organizes it in some fashion. - CORRECT
ANSWER container
If the head pointer points to NULL, this indicates: - CORRECT ANSWER there are no nodes in
the list
A doubly-linked list keeps track of the next node in the list, as well as: - CORRECT
ANSWER the previous node