6. User-Defined Functions Flashcards

1
Q

A(n) ____ is a named list of statements.

A

function

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

A function ____ consists of the new function’s name and a block of statements. The function’s name can be any valid identifier.

A

definition

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

A function ____ is an invocation of a function’s name, causing the function’s statements to execute.

A

call

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

A(n) ____ variable is a variable declared in a function, which is then accessible only within that function

A

local

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

A program’s execution begins with the ____ function.

A

Main

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

A(n) ____ is a function input specified in a function definition.

A

parameter

E.g., A pizza area function might have diameter as an input.

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

A(n) ____ is a value provided to a function’s parameter during a function call.

A

argument

E.g., A pizza area function might be called as PrintPizzaArea(12.0) or as PrintPizzaArea(16.0).

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

A function may return one value by assigning a return ____ with the return ____.

A

variable, value

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

How many return variables can a function have?

A

One

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

A function call evaluates to the ____.

A

returned value

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

____ development is the process of dividing a program into separate units that can be developed and tested separately and then integrated into a single program.

A

Modular

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

____ development is a process in which a programmer writes and tests a few statements, then writes and tests a small amount more (an incremental amount), and so on.

A

Incremental

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

A ____ is a function definition whose statements have not yet been written.

A

function stub

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

A general guideline (especially for beginner programmers) is that a function’s definition usually shouldn’t have more than about ____ statements, although this guideline is not a strict rule.

A

20

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