Login
Your Email
Pasword
Home
Write
Trending
History
Liked
Dashboard

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.

Do you have similar website/ Product?
Show in this page just for only $2 (for a month)
Create an Ad
0/60
0/180
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.

CONTINUE READING
Module 2
basic structure of c
section of c
Programming in c
coding
Dalpat I
Content writer