During execution the mainline of a program can call on subprograms to perform specific tasks. These include:
Subprograms written by the developer.
Subprograms included in the development structure of the programming language. These subprograms form part of a library and can be called upon without writing a specific subprogram. i.e. Randomize function.
Subprograms built into the operating system. i.e. save or print commands.