Procedures and Functions:
Procedures – collection of statements that define parameterized computations.
Functions – semantically modeled on mathematical function
- no side effects
Most common imperative languages provide both functions and procedures.
C and C++ have only functions. However, these functions can behave like procedures.
e.g.
In function definition: void
sort(int list[], int listlen);
In function call: sort(scores, 100);