Basic Structure of C Program

Basic Structure of C Program


The above image shows the structure of the C program.

Documentation section :
consist of set of comment lines giving the name of the program the author and detail regarding the program.

Link section:
provides instructions to the compiler to link functions from system library.

Definition Section:
Defines all symbolic constants.

Global declaration section :
declares variables that are globally visible ,inside all the functions.

Main program section :
all  C  program must contain one main function . the program start to execute from the main function only.
It contains two parts the declaration part and the executable part.
  • In declaration part all the variables that are used in the executable part are declared.
  • there is atleast one statement in executable part.
  • these two parts appears between the opening and closing braces.
  • All the statements in declaration and executable parts ends with semicolon. 
Subprogram section :
contains all the user defined functions that are called in main function.




Thank you....

Popular Posts