Sending a copy of data to a program module is called _______
A. passing a value
B. making a reference
C. recursion
D. setting a condition
Select an option to see the answer and solution.
Of the three ways to pass arguments to functions, only passing by _____ and passing by _____ allow the function to modify the argument in the calling program
A. reference, pointer
B. array, location
C. array, pointer
D. None of the above
Select an option to see the answer and solution.
To use either an input or output file, the program must include the _____ header file
A. filestream.h
B. fstream.h
C. instream.h
D. inoutstream.h
E. iostream.h
Select an option to see the answer and solution.
A widget is to the blueprint for a widget as an object is to
A. a member function
B. a class
C. an operator
D. a data item
Select an option to see the answer and solution.
C++ allows you to define the same functions more than once in the same program _____
A. if the definitions are identical
B. if the definitions are included in two separate #include files
C. if the definitions are located in a single #include file that is included more than once
D. C++ does not allow you to define the same functions more than once in the same program
Select an option to see the answer and solution.
Which of the following assigns the number 5 to the area variable?
A. area 1 = 5
B. area = 5
C. area == 5
D. area → 5
E. area < > 5
Select an option to see the answer and solution.
A base class may also be called a
A. child class
B. subclass
C. derived class
D. parent class
Select an option to see the answer and solution.
The _____ mode tells C++ to open a file for input
A. add::ios
B. in::file
C. ios::app
D. ios::in
E. ios::out
Select an option to see the answer and solution.
Using the wardrobe structure within the ShopList structure is an example of a good programming principle, known as _____
A. reusability
B. polymorphism
C. redundancy
D. recursion
Select an option to see the answer and solution.
When you omit parameters from a function call, values can be provided by
A. formal parameters
B. reference parameters
C. overloaded parameters
D. default parameters
Select an option to see the answer and solution.
The first element in a string is
A. the name of the string
B. the first character in the string
C. the length of the string
D. the name of the array holding the string
Select an option to see the answer and solution.
Variables declared outside a block are called _____
A. global
B. universal
C. stellar
D. external
Select an option to see the answer and solution.
The compiler converts your C++ instructions into _____
A. edited code
B. object code
C. source code
D. translated code
Select an option to see the answer and solution.
A fundamental type such as int or double is a _____
A. programmer-defined type
B. complex type
C. nonscalar type
D. scalar type
Select an option to see the answer and solution.
The return type you code for all constructors is _____
A. void
B. the class type
C. the same type as the first data member defined in the class
D. no type
Select an option to see the answer and solution.
When an object-oriented program detects an error within a function, the function _________
A. throws an exception
B. throws a fit
C. catches a message
D. catches an exception
Select an option to see the answer and solution.
Using a statement at the wrong time or with an inappropriate object creates a
A. logical error
B. syntax error
C. compiler error
D. language error
Select an option to see the answer and solution.
When you create a derived class and instantiate an object _____
A. the parent class object must be constructed first
B. the child class object must be constructed first
C. the parent class object must not be constructed
D. the child class object must not be constructed
Select an option to see the answer and solution.
Evaluate the following expression: 4 >6 || 10 < 2 * 6
Select an option to see the answer and solution.
A constructor always has
A. communicational cohesion
B. temporal cohesion
C. logical cohesion
D. no cohesion
Select an option to see the answer and solution.