Programming Logic and Design
(Chapter I-V Review) Questions with
Complete Answers
The value stored in an uninitialized variable is - ANSWER-garbage
The value 3 is an example of - ANSWER-a numeric constant
The assignment operator - ANSWER-is a binary operator
Multiplication has a lower precedence than - ANSWER-parantheses
Which of the following is not a term used as a synonym for module? - ANSWER-
object
This facilitates reusability - ANSWER-Modularization
What is the name for the process of paying attention to important properties while
ignoring nonessential details? - ANSWER-abstraction
Every module has all of the following except - ANSWER-local variables
Programmers say that one module can _______________ another, meaning that the
first module causes the second module to execute. - ANSWER-call
The more that a module's statements contribute to the same job, the greater the
_______________ of the module - ANSWER-functional cohesion
In most modern programming languages, a variable or constant that is declared in a
module is _______________ in that module - ANSWER-in scope
Which of the following is not a typical housekeeping task? - ANSWER-printing
summaries
Which module in a typical program will execute the most times? - ANSWER-the
detailed loop
A hierarchy chart tells you - ANSWER-which modules call other modules
What are nonexecuting statements that programmers place within code to explain
program statements in English? - ANSWER-comments
Program comments are - ANSWER-neither required in a program nor a form of
external documentation
, Which of the following is valid advice for naming variables? - ANSWER-To make
names easier to read, separate long names by using underscores or capitalization
for each new word.
A message that asks a user for input is a(n) - ANSWER-prompt
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 how many tasks? - ANSWER-any number of tasks
Which of the following is not another term for a selection structure? - ANSWER-loop
structure
A _______________ expression has one of two values, often expressed as true or
false. - ANSWER-Boolean
Placing a structure within another structure is called _______________ structures. -
ANSWER-nesting
Attaching structures end to end is called _______________ - ANSWER-stacking
When an action is required if a condition is true, but no action is needed if it is false,
you use a _______________. - ANSWER-single-alternative selection
To take action repeatedly as long as a condition remains true, you use a
_______________. - ANSWER-loop
When you must perform one action when a condition is true and a different one
when it is false, and then the program continues, you use a _______________. -
ANSWER-dual-alternative selection
What attributes do all three basic structures share? - ANSWER-They all have one
entry and one exit point
What is true of stacking structures? - ANSWER-Each structure has only one point
where it can be stacked on top of another.
When you input data in a loop within a program, the input statement that precedes
the loop _______________. - ANSWER-is called a priming input
A group of statements that executes as a unit is a _______________. - ANSWER-
block
Placing a decision within a loop is _______________ - ANSWER-an acceptable
structured programming technique
(Chapter I-V Review) Questions with
Complete Answers
The value stored in an uninitialized variable is - ANSWER-garbage
The value 3 is an example of - ANSWER-a numeric constant
The assignment operator - ANSWER-is a binary operator
Multiplication has a lower precedence than - ANSWER-parantheses
Which of the following is not a term used as a synonym for module? - ANSWER-
object
This facilitates reusability - ANSWER-Modularization
What is the name for the process of paying attention to important properties while
ignoring nonessential details? - ANSWER-abstraction
Every module has all of the following except - ANSWER-local variables
Programmers say that one module can _______________ another, meaning that the
first module causes the second module to execute. - ANSWER-call
The more that a module's statements contribute to the same job, the greater the
_______________ of the module - ANSWER-functional cohesion
In most modern programming languages, a variable or constant that is declared in a
module is _______________ in that module - ANSWER-in scope
Which of the following is not a typical housekeeping task? - ANSWER-printing
summaries
Which module in a typical program will execute the most times? - ANSWER-the
detailed loop
A hierarchy chart tells you - ANSWER-which modules call other modules
What are nonexecuting statements that programmers place within code to explain
program statements in English? - ANSWER-comments
Program comments are - ANSWER-neither required in a program nor a form of
external documentation
, Which of the following is valid advice for naming variables? - ANSWER-To make
names easier to read, separate long names by using underscores or capitalization
for each new word.
A message that asks a user for input is a(n) - ANSWER-prompt
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 how many tasks? - ANSWER-any number of tasks
Which of the following is not another term for a selection structure? - ANSWER-loop
structure
A _______________ expression has one of two values, often expressed as true or
false. - ANSWER-Boolean
Placing a structure within another structure is called _______________ structures. -
ANSWER-nesting
Attaching structures end to end is called _______________ - ANSWER-stacking
When an action is required if a condition is true, but no action is needed if it is false,
you use a _______________. - ANSWER-single-alternative selection
To take action repeatedly as long as a condition remains true, you use a
_______________. - ANSWER-loop
When you must perform one action when a condition is true and a different one
when it is false, and then the program continues, you use a _______________. -
ANSWER-dual-alternative selection
What attributes do all three basic structures share? - ANSWER-They all have one
entry and one exit point
What is true of stacking structures? - ANSWER-Each structure has only one point
where it can be stacked on top of another.
When you input data in a loop within a program, the input statement that precedes
the loop _______________. - ANSWER-is called a priming input
A group of statements that executes as a unit is a _______________. - ANSWER-
block
Placing a decision within a loop is _______________ - ANSWER-an acceptable
structured programming technique