C Program Structure Explain With Details Part 1

Structure Of C Programming Language Explain With Structure
Get Our Latest Interview Questions: Aptitude, Reasoning, English, GD, HR-PI

Structure of C Programming:  
 ---------------------------------------------
Documentation Section 
Link Section 
Definition Section 
Global Declaration Section 
Main function         
{              
    Declaration part;              
    Executable part;         

Sub program section 
Function 1 
Function 2 
‘ 
‘ 
‘ 
Function n
---------------------------------------------
Documentation Section: 
A documentation section consist of comment line that helps us giving the heading name or Name – what we are doing  in program.  
For ex: if I am writing a program for developing any software then in start-up, if I am not  mentioned what I am doing, then no buddy can understand what program I am written, so for understanding we have to write a heading or tilte name like: Program for adding 2 no. For mention heading/title in c we are using comment line:

Comment Line In C Programming: 
There are 2 types of comment line: 
1. Single Line: (//) Ex: // Program to add 2 numbers. 
2. Multiple Line: (/*……..*/) Ex: /* Write a program to add 2 numbers given by the users. */ 
C never compile or run the comment line. So it is not displayed on output screen. We are also using comment line for mentioning what function/ structure or work we are doing within a code. 

Link Section:  
It provides instruction to the compiler to link library functions from there header files.  It means in c program we are using some built in programs and these programs are stored in header files. We just have to link those programs to our required filed or function. 
In above line question arise what is header file:
Header file is a collection of some c built in programs. 
Like For Ex: we write printf(“ABC”); and it print  ABC, but you think if we want to add 2 no then we need to write a long code so for printing the value, there is also we need to write code. Yes its true but c provides us some built in (Already written programs) function, we just need to call them then it directly link with that program and run the complete code and give us output. So you can say that header file is collection of built in functions.


Learn Remain In Next Post/ Page

Expert Review: Structure of c program tell us, the way of writing program so it is very important to know the structure before writing program and this questions is also come in interview like: "write structure of c programming". So you must read above and next page also for complete details.

 Enter Your Email Address To Get Our Latest Programming Updates In Your Mail / Subscribe Our Updates In Your Mail:


Labels: