Chapter 3 Modules Flashcards
A group of statements that exist within a program for the purpose of performing a specific task in an_
a. block
b. parameter
c. module
d. expression
module
A benefit of using modules that helps to reduce the duplication of code within a program is
a. code reuse
b. divide and conquer
c. debugging
d. facilitation of teamwork
divide and conquer
The first line of a module definition is known as the
a. body
b. introduction
c. initialization
d. header
header
You_ the module to execute it.
a. define
b. call
c. import
d. export
call
a ____ point is the memory address of the location in the program that the computer will return to when a module ends
a. termination
b. module definition
c. return
d. reference
return
A design technique that programmers use to break down an algorithm into modules is known as___
a. top-down design
b. code simplification
c. code refactoring
d. hierarchical sub tasking
top-down design
A ___ is a diagram that fives visual representation of the relationships between modules in a program.
a. flowchart
b. module relationship chart
c. symbol chart
d. hierarchy chart
hierarchy chart
A ___ is a variable that declared inside a module
a. global variable
b. local variable
c. hidden variable
d. none of the above
local variable
A.___ is the part of a program in which a variable may be accessed
a. declaration space
b. area of visibility
c. scope
d. mode
scope
a ___ is a piece of data that is sent into a module
a. argument
b. parameter
c. header
d. packet
argument
A ___ is a special variable that receives a piece of data when a module is called.
a. argument
b. parameter
c. header
d. packet
parameter
When ___ only a copy of the arguments value is passed into the parameter variable
a. passing by reference
b. passing an argument by name
c. passing an argument by value
d. passing an argument by type
passing an argument by value
When ___ the module can modify the argument in the calling part of the program.
a. passing by reference
b. passing an argument by name
c. passing an argument by value
d. passing an argument by type
passing an argument by reference
A variable that is visible to every module in the program is a ___
a. local variable
b. universal variable
c. program-wide variable
d. global variable
global variable
When possible, you should avoid using ___ variables in a program
a. local
b. global
c. reference
d. parameter
global