Each object of a class has its own copy of the class's ________.
(a) member functions
(b) member variables
(c) constructor and destructor functions
(d) All of these
(e) None of these - Answers (b) member variables
This type of member variable may be accessed before any objects of the class have been created.
(a) private
(b) public
(c) inline
(d) static
(e) None of these - Answers (d) static
This operator may be used to assign one object to another.
(a) =
(b) ==
(c) <>
(d) @
(e) None of these - Answers (a) =
C++ requires that a copy constructor's parameter be a(n) ________.
, (a) integer data type
(b) floating point data type
(c) pointer variable
(d) reference object
(e) None of these - Answers (d) reference object
C++ allows you to redefine the way ________ work when used with class objects.
(a) compiler errors
(b) preprocessor directives
(c) standard operators
(d) undefined variables
(e) None of these - Answers (c) standard operators
When objects contain pointers, it is a good idea to create an explicit ________ function.
(a) destructor
(b) copy constructor
(c) static constructor
(d) inline constructor
(e) None of these - Answers (b) copy constructor
A good reason for overloading an operator is to enable it to ________.
(a) outperform its C language counterparts
(b) work in its usual way, but with programmer-defined data types
(c) operate on more operands than in its standard definition
(d) operate on no operands