What is Structure in C program
Structure of the C program
Q) Draw the structure of the C program. Also, give one example.
Q) Write and explain the structure of a C program.
Almost all programs are written using the following general structure.

Document section:
This section consists of a set of comment lines that describe the name of the program, its purpose and other information.
E.g /*
This is my first C program
*/
- Link section:
This section contains the instruction for linking the library function with the program. It general contents #include preprocessor directives.
E.g. # include <studio.h>
- Definition section:
This section is used to define the symbolic constants used in the program. It generally contains #define preprocessor directive.
E.g.
#define PI 3.14
- Global Declaration Section:
This section is used for global variable declaration and function declaration used in the program.
E.g.
int maximum (int, int);
- main() function section:
Every program must contain the function called the main()function. The execution of a program is started from the main() function.
E.g.
voild main()
{
statements;
}
- Sub-program section:
This section is used to define the user-defined function.
E.g.voild test()
{
….
}
- E.g.
/*Document section (program for addition)*/
# include <stdio.h> /* Link section */
void main() /*main() function*/
{
int a=10, b=5, c;
c = a + b ;
printf(“addition is =%d”, c);
}