chapter 6 Flashcards

1
Q

actual parameter

A

a variable or expression listed in a call to a function

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

automatic variable

A

a variable for which memory is allocated at block entry and deallocated at block exit

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

body (of a function)

A

the code within the function required to accomplish the task

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

Data type (of a function)

A

the return type of a value-returning function

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

Definition (of a function)

A

includes name of function, listing of the parameters if any, data type of each parameter, data type of value returned by the function, and the code required to accomplish the task

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

different formal parameter lists

A

when 2 or more functions with the same name have a different number of formal parameters, or if they have the same number of parameters, the data type of the parameters differ in at least 1 position

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

driver

A

program that tests a function

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

external variable

A
  • a global variable declared within a function using the “extern” reserved word
  • the “extern” keyword indicates that the variable is declared elseware
How well did you know this?
1
Not at all
2
3
4
5
Perfectly
9
Q

formal parameter

A

a variable declared in the function heading

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

function header (heading)

A

includes name of the function, number of parameters if any, data type of each parameter, and data type of the value returned by the function

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

function overloading (overloading a function name)

A

creating several functions with the same name but different parameters lists

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

function prototype

A

function heading without the body of the function

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

global identifier

A

identifier declared outside of every function definition

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

local declaration

A

declaration of a variable within a block of code for use only within that block

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

local identifier

A

identifier declared within a function (a block)

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

local variables

A

variables declared in the body of a function (or block) for use only within that function (or block)

17
Q

module

A

another name for a function

18
Q

nested block

A

block declared within another block

19
Q

parameter

A
  • identifier in a function header, which acts within the function as a regular local variable
  • may be formal or actual
20
Q

reference parameter

A

formal parameter that receives the location (memory address) of the corresponding actual parameter

21
Q

return type (of a function)

A
  • the data type of the value that the function returns

- also called the data type of the function

22
Q

scope

A

refers to where an identifier is accessible (visible) in a program

23
Q

scope resolution operator

A
  • an operator that, when used, causes a global variable declared before the definition of a function (or block) to be accessed by the function (or block), even if the function (or block) has an identifier with the same name as the variable
  • (::)
24
Q

signature (of a function)

A

consists of the function name and its formal parameter list

25
Q

static variable

A

variable for which memory remains allocated as long as the program executes

26
Q

stub

A

function that is not fully coded

27
Q

value parameter

A

formal parameter that receives a copy of the content of the corresponding actual parameter

28
Q

value-returning functions

A

functions that have a return type

29
Q

void functions

A

functions that do not have a data type