A C program runs in a standard environment, and its interaction with this environment is specified in several ways:
- Program start and termination — How execution begins and ends, and how argument strings are obtained
- Environmental parameters — How environmental strings are made available to the program
- Files — Resources available to the program for storing and retrieving data
- External execution — Invoking other programs
- Standard text streams — Usually for interacting with the terminal from which the program was initiated
- Signal handling — Unscheduled events that could divert a program's behaviour