com207 module 4 midterm exam latest 2017

Question # 00494960 Posted By: rey_writer Updated on: 03/04/2017 01:09 AM Due on: 03/04/2017
Subject General Questions Topic General General Questions Tutorials:
Question
Dot Image

Module 4 midterm exam

Question 1 The __________ step to creating a computer solution is to analyze the problem.

third

first

second

fourth

Question 2 Between the switch statement’s opening and closing braces are the individual __________ clauses.

if

else

case

if/else

Question 3 You can use a(n) __________ to help you desk-check an algorithm.

flowchart

pseudocode

IPO chart

desk-check table

Question 4 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.

stop

break

continue

switch

Question 5 The evaluation of the condition in a __________ loop occurs before the instructions within the loop are processed.

for

pretest

while

posttest

Question 6 The do while statement must end with a(n) __________.

;

.

,

//end do while comment

Question 7 The __________ step to creating a computer solution is to code the algorithm into a program.

third

second

fourth

fifth

Question 8 A program that displays a message based on a letter grade that the user enters would require a(n) __________ selection structure.

nested

multiple-alternative

if

else

Question 9 The __________ condition tells the computer when to stop looping through the instructions.

repeat

continue

loop exit

looping

Question 10 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;

a negative number

a number greater or equal than 3

the number 0

either the number 0 or a negative number

Question 11 __________ means to assign a beginning value to a counter or accumulator variable.

Flushing

Iterating

Accumulating

Initializing

Question 12The __________ combines the object file with other machine code necessary for your C++ program to run correctly.

interpreter

assembler

linker

compiler

Question 13The 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.

source

executable

object

include

Question 14 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;

int totRegSales = 0;

while (region < 3

cin >> sales;

while (sales > 0)

Question 15 An assignment statement __________ create(s) a variable in memory.

does not

always

may not

may

Question 16 In a for clause, the __________ argument specifies the condition that must be true for the loop to continue processing the loop body instructions.

last

first

second

third

Question 17 A __________ is a C++ instruction that causes the computer to perform some action after it is executed, or processed, by the computer.

directive

processing item

statement

keyword

Question 18 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 __________.

1200

845

1350

720

Question 19 Logical operators are sometimes referred to as __________ operators.

Relational

Comparison

Conditional

Boolean

Question 20 The first of two diamonds encountered along a path in a flowchart represents the condition of the __________ selection structure of a nested selection structure.

switch

inner

nested

outer

Question 21 In a flowchart, the oval symbol is called the __________ symbol.

process

selection

start/stop

input/output

Question 22 The And operator in C++ is __________.

!

||

&&

&

Question 23 The selection structure is also called the __________ structure.

diamond

switch

decision

case

Question 24 __________ an algorithm refers to the process of translating the algorithm into a language that the computer can understand.

Assembling

Translating

Coding

Tracing

Question 25 The processing portion of an IPO chart might include a __________.

statement about the input data

statement about the output dat

notation to the user of the program

flowchart

Dot Image
Tutorials for this Question
  1. Tutorial # 00491477 Posted By: rey_writer Posted on: 03/04/2017 01:10 AM
    Puchased By: 4
    Tutorial Preview
    The solution of com207 module 4 midterm exam latest 2017...
    Attachments
    module_4_midterm_exam.docx (82.5 KB)
    Recent Feedback
    Rated By Feedback Comments Rated On
    Rob...ith Rating The work is of top and best quality 08/23/2018
    ma...ama Rating Excellent team support and best services 05/02/2017

Great! We have found the solution of this question!

Whatsapp Lisa