c program Structure

ii.Link Section

Within the Link Section, we declare all the Header Files that are used in our program. From the link section, we instruct the compiler to link those header files from the system libraries, which we have declared in the link section in our program.
a copy of these file is inserted into our program before compilation.
Header File:
A header file is a file with extension .h which contains C function declarations and macro definitions to be shared between several source files. There are two types of header files: the files that the programmer writes and the files that comes with your compiler.
e.g The header files that comes with compiler are:
#include<stdio.h>,#include<string.h>,#include<math.h> etc.

iii. Definition Section

This section is used in C program to Declare symbolic Constants. several constants can be declared in this section.
In this section constants declared using define keyword. It is given by:
#define PI 3.14
#define g 9.8

Global Declaration Section

There are some variables that are used in more than one function. Such variables are called global variables and are declared in the global declaration section that is outside of all the functions. This section also declares all the user-defined functions. The Statements present in Global Declaration Section will be accessible by all the functions in the program.
e.g. Global declaration of variable and user defined function.
float n=34;
float area(float r);

main() function section:

Every C program must have one main function section. This section contains two parts; the declaration part and the executable part
Declaration part: The declaration part declares all the variables used in the executable part.
Executable part: There is at least one statement in the executable part. These two parts must appear between the opening and closing braces. The program execution begins at the opening brace and ends at the closing brace. The closing brace of the main function is the logical end of the program. All statements in the declaration and executable part end with a semicolon.

Sub program 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. If the program is a multifunction program then the sub program section contains all the user-defined functions that are called in the main () function. User-defined functions are generally placed immediately after the main () function, although they may appear in any order.

Final Program Structure e.g.

/*Documentation Section:
Program Name: Program to find the area of circle
Author: Name of Author
Date : 12/01/2015
Time : 11 AM
*/
#include"stdio.h"  //link section
#include"conio.h"  //link section/
#define PI 3.14  //definition section
float area;  //global declaration section
void main()
{
float r;   //declaration part
printf("Enter the radius of the circle\n"); //executable part
scanf("%f",&r);
area=PI*r*r;
printf("Area of the circle=%f \n",area);
message();
}
void message()
{
printf("This Sub Function \n");
printf("we can take more Sub Function \n");
}

Final Program Structure e.g.