Chapter 2 Flashcards
Which module in a typical program will execute the most times?
the detail loop
A hierarchy chart tells you ____________.
which modules call other modules
Modularization ____________.
facilitates reusability
Which of the following is not a typical housekeeping task?
printing summaries
In most modern programming languages, a variable or constant that is declared in a module is ____________ in that module.
in scope
A variable’s data type describes all of the following except ____________.
the scope of the variable
The value stored in an uninitialized variable is ____________.
garbage
The value 3 is a ____________.
numeric constant
The assignment operator ____________.
is a binary operator
Programmers say that one module can ____________ another, meaning that the first module causes the second module to execute.
call
Multiplication has a lower precedence than ____________.
a. division
b. assignment
c. subtraction
d. none of the above*
The more that a module’s statements contribute to the same job, the greater the ____________ of the module.
functional cohesion
Program comments are ____________.
a. required to create a runnable program
b. a form of external documentation
c. both of the above
d. none of the above*
What are nonexecuting statements that programmers place within code to explain program statements in English?
comments
Which of the following is valid advice for naming variables?
To make names easier to read, separate long names by using underscores or capitalization for each new word.
Which of the following is not a term used as a synonym for module?
object
What is the name for the process of paying attention to important properties while ignoring nonessential details?
abstraction
A message that asks a user for input is a(n) ____________.
prompt
What does a declaration provide for a variable?
a. a name
b. a data type
c. both of the above*
d. none of the above
Every module has all of the following except___________ .
b. local variables