Professional Documents
Culture Documents
FUNCTION (PART 1)
OBJECTIVES
Output:
EXAMPLE (CONT.)
Output:
USER DEFINED FUNCTION
Main
Program
Actual Parameters
Formal Parameters
Function prototype (declaration)
Tells the compiler about a function’s name, return type, and parameters
Function definition
Provides the actual body of the function
Function call
A statement that executes a function
Formal Parameter
Is a reference parameter
These are the variables written or declared in function definition/prototype, and
received their values when a call to that function is made
Actual Parameter
The values/variables passed while calling a function
SYNTAX
SYNTAX (CONT.)
functionName ( )
FLOW OF EXECUTION