18.
The statement int num[2][3]={ {3,8,6}, {9,4,7}};
A. assigns a value 4 to num[1][2]
B. assigns a
value 7 to num[1][2]
C. assigns a
value 8 to num[1][2]
D. assigns a
value 9 to num[1][2]
19.
Private data can be accessed by
A. class member functions
B. functions in
derived classes
C. both (a) and
(b)
D. neither (a)
nor (b)
20.
The store of memory available to programs is the _____
A. store B. stack
C. pile D. heap
21.
The most common operation used in constructors is _____
A. addition B. overloading
C. assignment D. polymorphism
22.
When a function performs tasks based on a decision, it has
_____
A. functional
cohesion
B. coincidental
cohesion
C. logical cohesion
D. no cohesion
23.
To create a template class, you begin with _________
A. the template definition
B. the keyword
class
C. the function
definitions
D. the keyword
definition
24.
Which of the following is a C++ object?
A. >> B. read()
C. cin D. iostream
25.
A variable is _____
A. an item of
data
B. a memory location whose value can change while the program is running
C. a memory
location whose value cannot change while the program is running
26.
A function can
A. return a
value
B. perform a
task
C. change value
of actual arguments in call by reference
D. a, b, c above are all true
E. None of the
above
27.
The statement float values[]={3.14, -7.86, 36.96, 4.87};
A. assigns 36.96 to values[2]
B. assigns -7.86
to values[2]
C. gives an
error message
D. assign 14 to
values[2]
28.
A constructor initialization list is preceded by _____
A. a semicolon
B. a colon
C. two colons
D. a space
29.
When the compiler places a copy of a small function's
statements directly into a program, the function is said to be _____
A. overloaded B. mangled
C. inline D. redundant
30.
A group of related fields that contain all of the data about
a specific person, place, or thing is called a
A. data file
B. field file
C. program file
D. record
31.
To send output to a file, you need to include the _____
header file in your program
A. file.h
B. fstream.h
C. iomanip.h
D. iostream.h
E. of stream.h
32.
A C++ _____ is a program that runs in a DOS window
A. algorithm
B. cast
application
C. console application
D. source
application
33.
A difference, between reference variables and pointers is that
A. reference
variables are easier to use
B. pointers are
easier to use
C. reference
variables are more flexible
D. no difference
exists between reference variables and pointers
34.
A 'C function does not contain
A. a function
header
B. argument
declarations
C. other 'C' functions
D. function body
E. None of the
above
35.
_____ variables remain in memory until the program ends
A. Area B. Global
C. Local D. Reference
E. Value
36.
The outline or the definition of a function is called its
A. beta test
B. forerunner
C. outline
D. prototype
37.
Which of the following is false?
A. Data stored
in an array can be accessed faster than data stored in a disk file
B. Data stored
in an array needs to be entered only once, typically at the beginning of the
program
C. Arrays allow
the programmer to store information in the computer's internal memory
D. When using
arrays, you will have fewer variable names to remember
E. None of the preceding statements are false
38.
A function stub typically contains
A. the function
header
B. the function
braces
C. the return
statement, if it's value- returning function
D. a display
message
E. All of the above
39.
A variable's _____ indicates which portions of the program
can use the variable
A. area B. extent
C. lifetime D. reach
E. scope
40.
If an integer object is thrown with a throw statement, then
a subsequent catch block has a usable match if the type of the catch argument
is _____
A. const int
&
B. int &
C. either (a)
or (b)
D. neither (a)
nor (b)
41.
_____ variables are declared outside of any statement block
A. Area B. Global
C. Local D. Reference
E. Value

0 Comments