Programming Logic and Design -
Chapter 1-5 Review Exam Questions
and Answers
A message that asks a user for input is a ______. - ANSWER-Prompt
Computer programs are also known as ______ - ANSWER-b. software
The major computer operations include ______ - ANSWER-b. input, processing, and
output
Visual Basic, C++, and Java are all examples of computer ______ - ANSWER-d.
programming languages
A programming language's rules are its ______ - ANSWER-a. syntax
The most important task of a compiler or inerpreter is to ______ - ANSWER-c.
translate programming language statements into machine language
Which of the following is temporary, internal storage? - ANSWER-d. memory
Which of the following pairs of steps in the programming process is in the correct
order? - ANSWER-d. code the program, translate it into machine
language
The programmer's most important task before planning the logic of a program is to
______ - ANSWER-d. understand the problem
The two most commonly used tools for planning a program's logic are ______ -
ANSWER-a. flowcharts and pseudocode
Writing a program in a language such as C++ or Java is known as ______ the
program. - ANSWER-b. coding
An English-like programming language such as Java or Visual Basic is a ______
programming level - ANSWER-c. high-level
Which of the following is an example of a syntax error? - ANSWER-c. misspelling a
programming language word
Which of the following is an example of a logical error? - ANSWER-a. performing
arithmetic with a value before
inputting it
b. accepting two input values when a program requires
only one
, c. dividing by 3 when you meant to divide by 30
d. ALL OF THE ABOVE
The parallelogram is the flowchart symbol representing ______ - ANSWER-c. both a
and b
In a flowchart, a rectangle represents ______ - ANSWER-d. processing
In flowcharts, the decision symbol is a ______ - ANSWER-d. diamond
The term "eof" represents ______ - ANSWER-b. a generic sentinel value
When you use an IDE instead of a simple text editor to develop a program,______ -
ANSWER-d. some help is provided
When you write a program that will run in a GUI environment as opposed to a
command-line environment, ______ - ANSWER-b. some syntax is different
As compared to procedural programming, with objectoriented programming ______ -
ANSWER-a. the programmer's focus differs
Snarled program logic is called _______ code. - ANSWER-spaghetti
The three structures of structured programming are ______________. - ANSWER-
Sequence, Selection, and Loop
A sequence structure can contain __________. - ANSWER-any number of tasks
Which of the following is NOT another term for a selection structure? - ANSWER-
Loop structure
The structure in which you ask a question, and, depending on the answer, take some
action and then ask the question again, can be called all of the following except a(n)
_________. - ANSWER-if-else-then
Placing a structure within another structure is called ________ the structures. -
ANSWER-nesting
Attaching structures end to end is called _________. - ANSWER-stacking
The statement 'if age > = 65 then seniorDiscount = "yes"' is an example of a
____________. - ANSWER-single-alternative selection
The statement 'while temperature remains below 60, leave the furnace on' is an
example of a ____________. - ANSWER-loop
The statement 'if age < 13 then movieTicket = 4.00 else movieTicket = 8.50' is an
example of __________. - ANSWER-dual-alternation selection
Chapter 1-5 Review Exam Questions
and Answers
A message that asks a user for input is a ______. - ANSWER-Prompt
Computer programs are also known as ______ - ANSWER-b. software
The major computer operations include ______ - ANSWER-b. input, processing, and
output
Visual Basic, C++, and Java are all examples of computer ______ - ANSWER-d.
programming languages
A programming language's rules are its ______ - ANSWER-a. syntax
The most important task of a compiler or inerpreter is to ______ - ANSWER-c.
translate programming language statements into machine language
Which of the following is temporary, internal storage? - ANSWER-d. memory
Which of the following pairs of steps in the programming process is in the correct
order? - ANSWER-d. code the program, translate it into machine
language
The programmer's most important task before planning the logic of a program is to
______ - ANSWER-d. understand the problem
The two most commonly used tools for planning a program's logic are ______ -
ANSWER-a. flowcharts and pseudocode
Writing a program in a language such as C++ or Java is known as ______ the
program. - ANSWER-b. coding
An English-like programming language such as Java or Visual Basic is a ______
programming level - ANSWER-c. high-level
Which of the following is an example of a syntax error? - ANSWER-c. misspelling a
programming language word
Which of the following is an example of a logical error? - ANSWER-a. performing
arithmetic with a value before
inputting it
b. accepting two input values when a program requires
only one
, c. dividing by 3 when you meant to divide by 30
d. ALL OF THE ABOVE
The parallelogram is the flowchart symbol representing ______ - ANSWER-c. both a
and b
In a flowchart, a rectangle represents ______ - ANSWER-d. processing
In flowcharts, the decision symbol is a ______ - ANSWER-d. diamond
The term "eof" represents ______ - ANSWER-b. a generic sentinel value
When you use an IDE instead of a simple text editor to develop a program,______ -
ANSWER-d. some help is provided
When you write a program that will run in a GUI environment as opposed to a
command-line environment, ______ - ANSWER-b. some syntax is different
As compared to procedural programming, with objectoriented programming ______ -
ANSWER-a. the programmer's focus differs
Snarled program logic is called _______ code. - ANSWER-spaghetti
The three structures of structured programming are ______________. - ANSWER-
Sequence, Selection, and Loop
A sequence structure can contain __________. - ANSWER-any number of tasks
Which of the following is NOT another term for a selection structure? - ANSWER-
Loop structure
The structure in which you ask a question, and, depending on the answer, take some
action and then ask the question again, can be called all of the following except a(n)
_________. - ANSWER-if-else-then
Placing a structure within another structure is called ________ the structures. -
ANSWER-nesting
Attaching structures end to end is called _________. - ANSWER-stacking
The statement 'if age > = 65 then seniorDiscount = "yes"' is an example of a
____________. - ANSWER-single-alternative selection
The statement 'while temperature remains below 60, leave the furnace on' is an
example of a ____________. - ANSWER-loop
The statement 'if age < 13 then movieTicket = 4.00 else movieTicket = 8.50' is an
example of __________. - ANSWER-dual-alternation selection