5. Topic 4 - Functions and Structured Programming¶
- A function is a portion of a program which can be called to perform a task and then return to the calling program.
- We have already seen some functions provided by the system (printf(), scanf(), sqrt (see Mathematical Functions) …) and we talked briefly about how to write our own functions. (see Functions)
- In this topic we will discuss the following details about
functions:
- Review of how to write and call functions.
- Rules related to the scope of variables used with functions. This leads directly into the general subject of data storage classes and a related, but side topic of how data and memory is managed by the computer.
- Program design issues as related to splitting up the program’s work into functions.
- Recursive functions and program design using recursion.
Contents