Enter your email id to get regular update free
Login
Your Email
Pasword

Basic structure of C language ( Module 2).

In this module we will discuss on the basic structure of C language which is implemented during writing every program in C.

Basic structure of C language :-
The program written in C language follows this basic structure. The sequence of sections should be as they are in basic structure. A C programs should have one or more sections but the sequence of sections is to be followed.
  1.  Documentation sections. 
  2. Linking section. 
  3. Definition section. 
  4. Global declaration section.
  5. Sub program or function section. 
  6. Main function section. 
  • Declaration section. 
  • Executable section. 
Documentation section :- 
It comes first and is used to document the use of logic or reasons in the program. It can be used to write the program's objective, developer and logic details. The documentation section is done in C language with /* and */ whatever is written in between these two are called comments. 
Linking section :- 
This section tells the compiler to link the certain occurrence of keywords or function in our program to the header files specified in this section. 
Definition section :- 
It is used to declare some constants and assign them some value. Eg. #define max 25. Here #define is a compiler directives which tells the conpiler whenever max is found in the program replace it with 25. 
Global declaration section :-
Here the variables which are used throughout the program (including main and other functions)  are declared so as to make them global. 
Main function section :- 
It tells the compiler where to start the execution from.    
main()    
{ point from execution starts }. 
Main function has two sections :-
1. Declaration section : In this the variables and their data types are declared. 
2. Executable section : This has the part of program which actually performs the task we need. 
Sub program or function section :- 
This has all the sub programs or the functions which our program needs.

Module 2
basic structure of c
section of c
Programming in c
coding
Dalpat I
Content writer
Total 72 views