Basic Structure of C Program
Basic Structure of C Program
A C program involves the following sections, 2nd, 3rd and 5th point may not be there in
few C programs:
Documentation Section
This section consists of comment lines which include the name of programmer,
the author and other details like time and date of writing the program.
Documentation section helps anyone to get an overview of the program.
Link Section
The link section consists of the header files of the functions that are used in the
program. It provides instructions to the compiler to link functions from the
system library.
Definition Section
All the symbolic constants are written in definition section. Macros are known as
symbolic constants.
Subprogram Section
The subprogram section contains all the user defined functions that are used to
perform a specific task. These user defined functions are called in the main()
function.
Ex: