Saturday 13 November 2010

structure of c

The “C” program contains the 3parts

A C Program contains :

Part 1
Documentation Section (Comments)
Link Section
Definition Section (Macros)
Global Declaration Section (Global Variables)
Part 2
main() section
Part 3
Sub Program Section (Functions)
                                                                                   Part-1
Documentation section .
It contains the comment lines.
It is optional
Link Section.
It contains the header files.
Ex
#include<stdio.h>
#include<conio.h>
Definition Section.
The definition section contains the macros. It is optional
Global Section
If the variable is declared before the function then it is known as the variable
Ex:
int a;
void main()
{
 statements;
}
Part-2
main()
”C” program starts from the main() section, main() contains the blog of the statements.
main is the special user defined (), it is not predefined in any header files
Part-3
Sub program section.
 It is a user defined function


























No comments:

Post a Comment