basic structure of c program |
2-Link Section
3-Definition Section
4-Global Declaration
5-Main()
{
Declaration Section
Execution (logic) Section
}
6-Subprogram Section
7-User defined function Section
1.Documentation Section
-in this Section we define comment like program definition, name of programmer, etc..
e.g. - /* */, //
2.Link Section
-This Section is the core part of the programe in which compiler links the inbuilt function from the system library.
e.g. - # include < >
3.Definition Section
-In this part, we define a symbolic constant.
e.g. – define PI = 3.14
4.Global Declaration
-When programmer wants to use some variables that are used in more than one functions at a time or at that time.
5.Main
-This section contains two parts.
1.Declaration parts in which all the variables and user defined functions(udf) are declared.
2.Execution part in which program logic and other process is done.
6.Subprogram Section
-It describes all the user defined functions(UDF) that are called in main section.