Question 1
Question
The ____ and ____ were established to standardize the syntax of C++.
Answer
-
American National Standard Organization (ANSO); International Standard Institute (ISI)
-
American Standard Code for Information Interchange (ASCII); International Standard Organization (ISO)
-
American National Standard Institution (ANSI); International Standard Organization (ISO)
-
American National Standard Institution (ANSI); Unicode
Analysis
Question 2
Question
The language of a computer is called ____.
Answer
-
machine language
-
assembly language
-
source code
-
system code
Question 3
Question
A(n) ____ monitors the overall activity of the computer and provides services.
Answer
-
compiler
-
assembler
-
control unit
-
operating system
Question 4
Question
A program called the ____ combines the object program with other programs in the library and is used in the program to create the executable code.
Answer
-
joiner
-
linker
-
combiner
-
assembler
Question 5
Question
A(n) ____ is a unique location in main memory for each cell.
Answer
-
counter
-
address
-
register
-
signal
Question 6
Question
ASCII is a(n) ____-bit code.
Question 7
Question
A(n) _____ program is the machine language version of the high-level language program.
Answer
-
source
-
object
-
preprocessor
-
linker
Question 8
Question
Word processors, games, and spreadsheets are examples of ____ programs.
Answer
-
system
-
source
-
application
-
operating
Question 9
Question
Main memory consists of an ordered sequence of ____.
Answer
-
memory cells
-
registers
-
logical units
-
signals
Question 10
Question
In a C++ program, statements that begin with the # symbol are called ____ directives.
Answer
-
library
-
preprocessor
-
operator
-
postprocessor
Question 11
Question
If all operands in an expression are integers, the expression is called a(n) _____ expression.
Answer
-
single precision
-
integral
-
integer
-
double precision
Question 12
Question
____ are names of things that appear in a program, such as variables, constants, and functions.
Answer
-
Comments
-
Tokens
-
Data types
-
Identifiers
Question 13
Question
A string containing no characters is called a(n) ____ string.
Question 14
Question
The smallest individual unit of a program written in any language is called a _____.
Question 15
Question
In C++, a ____ is used to end a statement.
Answer
-
forward slash
-
semicolon
-
comma
-
period
Question 16
Question
In C++, the cast operator takes the following form: ____.
Answer
-
static_cast<dataTypeName>(expression)
-
static_cast<dataTypeName>
-
static_cast (expression)
-
expression<static_cast> (dataTypeName)
Question 17
Question
When using the char data type, you enclose each character represented within ____.
Answer
-
parentheses
-
double quotation marks
-
single quotation marks
-
brackets
Question 18
Question
A(n) ____ is a set of values together with a set of operations.
Answer
-
function
-
sequence
-
data type
-
operand
Question 19
Question
The _____ data type is used to represent any real number between -3.4E+38 and 3.4E+38.
Answer
-
double
-
int
-
float
-
long double
Question 20
Question
_____ lines are executable statements that inform the user what to do.
Answer
-
Prompt
-
Comment
-
Document
-
Question
Question 21
Question
To force floating-point output to show the decimal point and trailing zeros, use the ____ manipulator.
Answer
-
point
-
scientific
-
showpoint
-
decimal
Question 22
Question
The ____ manipulator controls the output of only the next expression.
Answer
-
fixed
-
setprecision
-
setw
-
showpoint
Question 23
Question
The extraction operator takes ____ operands.
Question 24
Question
The output stream variables can use the manipulator ____ to fill the unused columns with a character other than a space.
Answer
-
setw
-
charfill
-
setfill
-
setchar
Question 25
Question
Variables of type ____ are called input stream variables.
Answer
-
istream
-
stream
-
ostream
-
iostream
Question 26
Question
The manipulator ____ is used to output floating-point numbers in scientific format.
Answer
-
sets
-
fixed
-
scientific
-
setsci
Question 27
Question
I/O functions are typically called ____ member functions.
Answer
-
stream
-
common
-
access
-
user
Question 28
Question
To left-justify output in C++, use the ____ manipulator.
Answer
-
setcolumn
-
left
-
justify
-
setleft
Question 29
Question
A ____ is an area in secondary storage used to hold information.
Answer
-
member
-
file
-
sector
-
variable
Question 30
Question
You can use the ____ function to restore an input stream to a working state.
Question 31
Question
Which of the following is NOT a reserved word in C++?
Answer
-
break
-
case
-
select
-
default
Question 32
Question
You can use either a(n) ___ variable or a bool variable to store the value of a logical expression.
Question 33
Question
When using a return statement, the return of any value other than ____ indicates that something went wrong during program execution.
Question 34
Question
To permit more than one statement to execute if an expression evaluates to true, C++ provides a structure called a ____ statement.
Answer
-
switch
-
one-way selection
-
compound
-
two-way selection
Question 35
Question
When C++ evaluates a logical expression, any nonzero value is treated as _____.
Answer
-
a logical error
-
a syntax error
-
false
-
true
Question 36
Question
In ____ evaluation, the computer evaluates a logical expression from left to right and stops as soon as the value of the expression is known.
Answer
-
conditional
-
decision maker
-
short-circuit
-
associative
Question 37
Question
Which of the following expressions evaluates to true?
Question 38
Question
Which of the following expressions evaluates to true?
Answer
-
"Hello" = "hello"
-
"Bill" >= "Billy"
-
"Hello" > "Hi"
-
"Air" < "An"
Question 39
Question
Given the input stream variable cin, the expression ____ evaluates to true if the last input succeeded.
Answer
-
(cin = 1)
-
(cin <<)
-
(cin)
-
(cin == 0)
Question 40
Question
If the possible range of values for a multiple selection statement cannot be reduced to a finite set of values, you must use the ____ structure.
Answer
-
nested if
-
if
-
switch
-
if ... else
Question 41
Question
The function time is defined in the header file ____.
Answer
-
cstdlib
-
ctime
-
cmath
-
iomanip
Question 42
Question
Which of the following is the general form of the do...while statement?
Answer
-
do statement while (expression);
-
do (statement); while expression
-
do while statement (expression);
-
do expression while (statement);
Question 43
Question
Putting one control structure inside another is called ____.
Answer
-
looping
-
indexing
-
sequencing
-
nesting
Question 44
Question
The C++ eof function is a member of the data type ____.
Answer
-
iomanip
-
istream
-
cstdlib
-
file
Question 45
Question
The function rand() is defined in the header file ____.
Answer
-
iostream
-
iomanip
-
cstdlib
-
cmath
Question 46
Question
When the ____ statement executes in a repetition structure, it immediately exits from the structure.
Question 47
Question
A _____ is a special value that marks the end of the input data.
Answer
-
trigger
-
switch
-
sentinel
-
constant
Question 48
Question
The _____ statement is an effective way to avoid extra variables to control a loop and produce elegant code.
Answer
-
break
-
switch
-
continue
-
skip
Question 49
Question
The _____ loop is a pretest loop.
Answer
-
indexed
-
while
-
switch
-
do...while
Question 50
Question
The primary purpose of the ____ loop is to simplify the writing of counter-controlled loops.
Answer
-
sentinel
-
do-while
-
nested
-
for
Question 51
Question
The heading of a function includes all of the following EXCEPT the ____.
Answer
-
number of parameters
-
data type of the parameters
-
data type of the return value
-
code required to accomplish the task
Question 52
Question
A variable for which memory is allocated at block entry and deallocated at block exit is called a(n) _____ variable.
Answer
-
static
-
identification
-
unique
-
automatic
Question 53
Question
A ____ parameter is a formal parameter that receives the location (memory address) of the corresponding actual parameter.
Answer
-
static
-
memory
-
value
-
reference
Question 54
Question
Which of the following statements is FALSE?
Answer
-
Default values can be constants, global variables, or function calls.
-
If you do not specify the value of a default parameter, the default value is used for that parameter.
-
You can assign a constant value as a default value to a reference parameter.
-
The calling function has the option of specifying a value other than the default for any default parameter.
Question 55
Question
The C++ function pow has ____ parameters.
Question 56
Question
The _____ of an identifier refers to where in the program an identifier is accessible.
Answer
-
parameter
-
behavior
-
scope
-
definition
Question 57
Question
If a function is overloaded, then in a call to that function, the _____ determines which function to execute.
Answer
-
scope
-
declaration
-
definition
-
signature
Question 58
Question
The C++ function ____ calculates the largest whole number that is less than or equal to x.
Answer
-
ceil(x)
-
floor(x)
-
abs(x)
-
eqwhole(x)
Question 59
Question
____ parameters provide a one-way link between actual parameters and formal parameters.
Answer
-
Reference
-
Global
-
Static
-
Value
Question 60
Question
In C++, :: is called the scope ____ operator.
Answer
-
identity
-
comparison
-
equivalent
-
resolution
Question 61
Question
In C++, [ ] is called the _____ operator.
Answer
-
array subscript
-
character
-
array
-
array index
Question 62
Question
You can use the ____ operator to increment or decrement the value of an enumeration type.
Answer
-
assignment
-
scope resolution
-
stream
-
cast
Question 63
Question
You can access an individual character within a string using the array subscript operator together with the ____.
Answer
-
value of the character in single quotes
-
position of the character in the string
-
the integer equivalent of the character value
-
value of the character in double quotes
Question 64
Question
If a global identifier in a program has the same name as a global identifier in an included header file, the ____.
Answer
-
compiler automatically generates a new name for the global identifier in the program
-
compiler generates a syntax error
-
global identifier in the program overrides the global identifier in the header file
-
global identifier in the header file overrides the global identifier in the program
Question 65
Question
The operator ____ can be used to concatenate two values of type string.
Question 66
Question
Before using the data type string, the program must use which of the following statements to include the header file?
Answer
-
#include (cstring)
-
include <#string>
-
#include <cstring>
-
#include <string>
Question 67
Question
The ____ function is used to interchange the contents of two string variables.
Answer
-
substr
-
switch
-
swap
-
change
Question 68
Question
The enumeration type is a(n) ____ type.
Answer
-
integral
-
string
-
Boolean
-
character
Question 69
Question
The values that you specify for an enumeration type must be _____.
Answer
-
identifiers
-
sorted
-
reserved words
-
true or false
Question 70
Question
An enumeration type is a set of ____ values.
Answer
-
constant
-
ordered
-
unordered
-
anonymous