Structure of a 'C' program.

Documentation section
Link section
Definition section
Global declaration section
Main () funtion section
{
Declaration part
Executable part
}
Sub program section
Function 1
Funtion 2
.
.                       }- User defined function definitions
.
Function n

The Documentation section consist of a set of comment lines giving the name of the program author and explanation about program.

The link section provides instructions to the complies to link functions from the library.
The definition section defines all symbolic constants.

In the global declaration section variables that are shared by all the functions are declared.
Every 'C' program must contains main () section. The main () section contains 2 parts declaration part and executable part.

There declaration parts declares all the variables used in the executable part.
The is atleast one statement in the opening and closing brace the program execution beings at opening brace '{' and end at closing brace '}' whic is the logical end of program. All statement in the declaration and executable part end with semi colon.

The sub program section contains user defined functions definition.

Except main () function section all the other sections may be absent in a program when they are not required.