Programming Logic and Design Mid-
Term Review Exam Questions with
Correct Answers
The amount by which a for loop control variable changes is often called a ____
value.
a. group
b. key
c. step
d. sentinel - ANSWER-c. step
Named ____ hold values that do not change during a program's execution.
a. constants
b. variables
c. objects
d. items - ANSWER-a. constants
One advantage to using a named constant is that the statement becomes ____.
a. self-perpetuating
b. self-documenting
c. self-referencing
d. self-mitigating - ANSWER-b. self-documenting
The action or actions that occur within a loop are known as a(n) ____.
a. loop body
b. action body
c. loop internals
d. structure body - ANSWER-a. loop body
Programmers use the term ____ to describe programs that are well designed and
easy to understand and maintain.
a. industrial
b. intractable
c. well behaved
d. elegant - ANSWER-d. elegant
A ____ error results when you use a syntactically correct statement but use the
wrong one for the current context.
a. syntax
, b. logical
c. semantic
d. programming - ANSWER-b. logical
Because they enable you to locate a particular record directly (without reading all of
the preceding records), random
access files are also called ____ files.
a. direct access
b. indirect access
c. sequential access
d. pointed access - ANSWER-a. direct access
With a(n) ____, you perform an action or task, and then you perform the next action,
in order.
a. ordered structure
b. sequence problem
c. sequence structure
d. loop sequence - ANSWER-c. sequence structure
Programmers employ the acronym ____ to mean that if your input is incorrect, your
output is worthless.
a. IBOW
b. GIGO
c. IIOW
d. GIGS - ANSWER-b. GIGO
A loop within another loop is known as a(n) ____ loop.
a. indefinite
b. infinite
c. nested
d. hidden - ANSWER-c. nested
Usually, ____ variables are not considered to be equal unless they are identical.
a. string
b. integer
c. character
d. floating point - ANSWER-a. string
You can perform a ____ by making comparisons using either the lowest or highest
value in a range of values.
a. range check
b. nested if
c. logic check
d. trivial expression - ANSWER-a. range check
Term Review Exam Questions with
Correct Answers
The amount by which a for loop control variable changes is often called a ____
value.
a. group
b. key
c. step
d. sentinel - ANSWER-c. step
Named ____ hold values that do not change during a program's execution.
a. constants
b. variables
c. objects
d. items - ANSWER-a. constants
One advantage to using a named constant is that the statement becomes ____.
a. self-perpetuating
b. self-documenting
c. self-referencing
d. self-mitigating - ANSWER-b. self-documenting
The action or actions that occur within a loop are known as a(n) ____.
a. loop body
b. action body
c. loop internals
d. structure body - ANSWER-a. loop body
Programmers use the term ____ to describe programs that are well designed and
easy to understand and maintain.
a. industrial
b. intractable
c. well behaved
d. elegant - ANSWER-d. elegant
A ____ error results when you use a syntactically correct statement but use the
wrong one for the current context.
a. syntax
, b. logical
c. semantic
d. programming - ANSWER-b. logical
Because they enable you to locate a particular record directly (without reading all of
the preceding records), random
access files are also called ____ files.
a. direct access
b. indirect access
c. sequential access
d. pointed access - ANSWER-a. direct access
With a(n) ____, you perform an action or task, and then you perform the next action,
in order.
a. ordered structure
b. sequence problem
c. sequence structure
d. loop sequence - ANSWER-c. sequence structure
Programmers employ the acronym ____ to mean that if your input is incorrect, your
output is worthless.
a. IBOW
b. GIGO
c. IIOW
d. GIGS - ANSWER-b. GIGO
A loop within another loop is known as a(n) ____ loop.
a. indefinite
b. infinite
c. nested
d. hidden - ANSWER-c. nested
Usually, ____ variables are not considered to be equal unless they are identical.
a. string
b. integer
c. character
d. floating point - ANSWER-a. string
You can perform a ____ by making comparisons using either the lowest or highest
value in a range of values.
a. range check
b. nested if
c. logic check
d. trivial expression - ANSWER-a. range check