S exam
Question 1 (4 points) Question 1 Unsaved
The __________ step to creating a computer solution is to
analyze the problem.
Question 1 options:
third
first
second
fourth
Save
Question 2 (4 points) Question 2 Unsaved
Between the switch statement’s opening and closing braces
are the individual __________ clauses.
Question 2 options:
if
else
case
if/else
Save
Question 3 (4 points) Question 3 Unsaved
You can use a(n) __________ to help you desk-check an
algorithm.
Question 3 options:
flowchart
pseudocode
IPO chart
desk-check table
Save
Question 4 (4 points) Question 4 Unsaved
If the default clause is not the last clause in the switch
statement, you will need to include a __________ statement at the end of the
clause to stop the computer from processing the instructions in the next case
clause.
Question 4 options:
stop
break
continue
switch
Save
Question 5 (4 points) Question 5 Unsaved
The evaluation of the condition in a __________ loop occurs
before the instructions within the loop are processed.
Question 5 options:
for
pretest
while
posttest
Save
Question 6 (4 points) Question 6 Unsaved
The do while statement must end with a(n) __________.
Question 6 options:
;
.
,
//end do while comment
Save
Question 7 (4 points) Question 7 Unsaved
The __________ step to creating a computer solution is to
code the algorithm into a program.
Question 7 options:
third
second
fourth
fifth
Save
Question 8 (4 points) Question 8 Unsaved
A program that displays a message based on a letter grade
that the user enters would require a(n) __________ selection structure.
Question 8 options:
nested
multiple-alternative
if
else
Save
Question 9 (4 points) Question 9 Unsaved
The __________ condition tells the computer when to stop
looping through the instructions.
Question 9 options:
repeat
continue
loop exit
looping
Save
Question 10 (4 points) Question 10 Unsaved
In the code shown below, the computer continues processing
the inner loop’s instructions until the user enters __________, at which time
the inner loop ends.
int sales = 0;
int region = 1;
int totRegSales = 0;
while (region < 3)
{
cout <<
“First sales amount for Region ”
<<
region << “: “;
cin >> sales;
while (sales >
0)
{
totRegSales =
totRegSales + sales;
cout <<
“Next sales amount for Region ”
<<
region << “: “;
cin >>
sales;
} //end while
cout << endl
<< “Region ” << region
<< ” sales: $”
<<
totRegSales << endl << endl;
region = region +
1;
totRegSales = 0;
} //end while
cout << “End of program” << endl;
Question 10 options:
a negative number
a number greater or equal than 3
the number 0
either the number 0 or a negative number
Save
Previous PageNext Page
Question 11 (4 points)
__________ means to assign a beginning value to a counter or
accumulator variable.
Question 11 options:
Flushing
Iterating
Accumulating
Initializing
Save
Question 12 (4 points)
The __________ combines the object file with other machine
code necessary for your C++ program to run correctly.
Question 12 options:
interpreter
assembler
linker
compiler
Save
Question 13 (4 points)
The linker produces a(n) __________ file, which is a file
that contains all of the machine code necessary to run your C++ program as many
times as desired without the need for translating the program again.
Question 13 options:
source
executable
object
include
Save
Question 14 (4 points)
In the code shown below, the __________ clause begins the
inner loop.
int sales = 0;
int region = 1;
int totRegSales = 0;
while (region < 3)
{
cout <<
“First sales amount for Region ”
<<
region << “: “;
cin >> sales;
while (sales >
0)
{
totRegSales =
totRegSales + sales;
cout <<
“Next sales amount for Region ”
<<
region << “: “;
cin >>
sales;
} //end while
cout << endl
<< “Region ” << region
<< ” sales: $”
<<
totRegSales << endl << endl;
region = region +
1;
totRegSales = 0;
} //end while
cout << “End of program” << endl;
Question 14 options:
int totRegSales = 0;
while (region < 3)
cin >> sales;
while (sales > 0)
Save
Question 15 (4 points)
An assignment statement __________ create(s) a variable in
memory.
Question 15 options:
does not
always
may not
may
Save
Question 16 (4 points)
In a for clause, the __________ argument specifies the
condition that must be true for the loop to continue processing the loop body
instructions.
Question 16 options:
last
first
second
third
Save
Question 17 (4 points)
A __________ is a C++ instruction that causes the computer
to perform some action after it is executed, or processed, by the computer.
Question 17 options:
directive
processing item
statement
keyword
Save
Question 18 (4 points)
Consider the following pseudocode:
1. enter the
code and sales amount
2. calculate
the bonus amount by multiplying the sales amount by .08
3. if (the
code is X)
if (the sales are greater than or equal to 10000)
add 150 to the bonus amount
else
add 125 to the bonus amount
end if
end if
4. display
the bonus amount
If the code is X and the sales amount is 15000, the value of
the bonus amount at the end of the algorithm in the accompanying figure will be
__________.
Question 18 options:
1200
845
1350
720
Save
Question 19 (4 points)
Logical operators are sometimes referred to as __________
operators.
Question 19 options:
Relational
Comparison
Conditional
Boolean
Save
Question 20 (4 points)
The first of two diamonds encountered along a path in a
flowchart represents the condition of the __________ selection structure of a
nested selection structure.
Question 20 options:
switch
inner
nested
outer
Save
Previous PageNext PagePage 2 of 3
________________________________________
Question 21 (4 points)
In a flowchart, the oval symbol is called the __________
symbol.
Question 21 options:
process
selection
start/stop
input/output
Save
Question 22 (4 points)
The And operator in C++ is __________.
Question 22 options:
!
||
&&
&
Save
Question 23 (4 points)
The selection structure is also called the __________
structure.
Question 23 options:
diamond
switch
decision
case
Save
Question 24 (4 points)
__________ an algorithm refers to the process of translating
the algorithm into a language that the computer can understand.
Question 24 options:
Assembling
Translating
Coding
Tracing
Save
Question 25 (4 points)
The processing portion of an IPO chart might include a
__________.
Question 25 options:
statement about the input data
statement about the output data
notation to the user of the program
flowchart