Surprise Me!

STRUCTURE OF C LANGAUGE

2017-01-05 13 Dailymotion

‘C’ Is a structured programming language . A ‘C’ program is not more than a collection or a set of functions .Each function is a collection of statements which performs a specific task in the program.

DOCUMENTATIO SECTION :-
To enhance the readability of the program ,the programmer can provide the comments about the program in this section .The comments can be used anywhere in the program .The comments are included between the delimiters /* and */ . These lines are not executable rather they are ignored by the compiler .

HEADERFILE SECTION :-
A ‘C’ program depends on the header files to a greater extend . A header file contains information required by the compiler , when call to the library function used in the program occurs during the compilation . A header file has an extension of .h . These files are included in the program using pre processer directory #include.

GLOBAL DECLARATION SECTION :-
This section is used for declaring the global variables . Sometimes in a ‘C’ program there is a declaring a common variable for all other functions existing in the program .Thus the variable has to be declared in this section.


PROGRAM SECTION:-
This section starts with a function named as main(). Every ‘C’ program must contain only one main ().
It is the starting pointing of the program execution . The function main() has no parameters or arguments . The program execution starts from the opening brace ({) and terminates at the closing brace(}) occurs after the main. The main function contains of declaration and executing statements.

USER DEFINE FUNCTION SECTION :-
‘C’ language provide the fecility for the user to define their own function . These user define functions are defined after the main. This section is not mandatory.