Chapter 5 Flashcards

1
Q

Function

A

Group of statements within a program that perform a specific task.

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

Modular program

A

Program wherein each task within the program is in its own function.

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

Void function

A

Simply executes the statements it contains and then terminates

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

Value-back function

A

Simply executes the statements it contains and then terminates

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

Function Definition

A

Specifies what a function does.

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

Function header

A

First line of function

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

Block

A

Set of statements that belong together as a group. MUST BE INDENTED

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

Formal parameters

A

Variables in the parentheses when the function is defined.

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

Arguments

A

Pieces of data that is sent into a function when you call the function.

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

The formal parameters and the actual parameters must match in what?

A

number, order, and data type.

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

Local variable

A

Variable that is assigned a value inside a function.

  • Belongs to the function in which it was created.
  • Only statements inside that function can access it.
How well did you know this?
1
Not at all
2
3
4
5
Perfectly
12
Q

Scope

A

Part of a program in which a variable may be accessed.

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