chapter 6 Flashcards
actual parameter
a variable or expression listed in a call to a function
automatic variable
a variable for which memory is allocated at block entry and deallocated at block exit
body (of a function)
the code within the function required to accomplish the task
Data type (of a function)
the return type of a value-returning function
Definition (of a function)
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
different formal parameter lists
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
driver
program that tests a function
external variable
- a global variable declared within a function using the “extern” reserved word
- the “extern” keyword indicates that the variable is declared elseware
formal parameter
a variable declared in the function heading
function header (heading)
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
function overloading (overloading a function name)
creating several functions with the same name but different parameters lists
function prototype
function heading without the body of the function
global identifier
identifier declared outside of every function definition
local declaration
declaration of a variable within a block of code for use only within that block
local identifier
identifier declared within a function (a block)