Chapter 3 Modules Flashcards

1
Q

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

A

module

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
2
Q

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

A

divide and conquer

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
3
Q

The first line of a module definition is known as the

a. body
b. introduction
c. initialization
d. header

A

header

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
4
Q

You_ the module to execute it.

a. define
b. call
c. import
d. export

A

call

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
5
Q

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

A

return

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
6
Q

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

A

top-down design

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
7
Q

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

A

hierarchy chart

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
8
Q

A ___ is a variable that declared inside a module

a. global variable
b. local variable
c. hidden variable
d. none of the above

A

local variable

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
9
Q

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

A

scope

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
10
Q

a ___ is a piece of data that is sent into a module

a. argument
b. parameter
c. header
d. packet

A

argument

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
11
Q

A ___ is a special variable that receives a piece of data when a module is called.

a. argument
b. parameter
c. header
d. packet

A

parameter

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
12
Q

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

A

passing an argument by value

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
13
Q

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

A

passing an argument by reference

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
14
Q

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

A

global variable

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
15
Q

When possible, you should avoid using ___ variables in a program

a. local
b. global
c. reference
d. parameter

A

global

How well did you know this?
1
Not at all
2
3
4
5
Perfectly