Lesson 9 Flashcards
(16 cards)
Can only be used within the
function.
Have a local scope
Local
Have a global scope.
Available from any function in the
program, including main ( )
Global
are generally used to make programs modular. This means that programs are subdivided into modules or “functions” which allows programs to be read or modified easily.
Function
return the address of the operators.
Address of operator(&)
values which may be variables or expressions passed on to the function and are normally
found in the function call.
Arguments
returns the value of the address stored by the pointer.
Indirection operator (*)
creating more than one function with the same name.
Function overloading
consists of the return type, a function name, and a parameter list; a way of identifying the data types of any return value and parameter for the compiler so it can perform error-checking.
Function prototype or function declaration
have a global scope, and thus, are available from any function in the program, including main ( ).
Global variables
can only be used within the function; have a local scope.
Local variables
found and declared in the function header; accept values from the program or another
function.
Parameters
the addresses of the arguments are passed; the parameters, as well as the
arguments, only refer to the same memory location.
Pass-by-Reference method
parameters only accept the values passed on to them.
Pass-by-value method
used to return a single value from a function.
Return statement
the results of the function which may be passed to another function.
Return values
the section of code where a variable is allowed to be accessed or referenced.
Scope