C Program Execution


Step By Step Execution Of C Program
Step 1: Edit
1. This is First Step i.e Creating and Editing Program.
2. First Write C Program using Text Editor , such as [ Borland C/C++ 3.0 ,
Notpad++,Notpad ]
3. Save Program by using [.C] Extension.

4. File Saved with [.C] extension is called “Source Program“.
Step 2: Compiling
1. Compiling C Program: C Source code with [.C] Extension is given as input
to compiler and compiler convert it into Equivalent Machine Instruction.
2. In Borland C/C++ 3.0 program can be compiled using key [Alt + F9].
3. Compiler Checks for errors . If source code is error-free then Code is
Converted into Object File [.Obj ].
 
Step 3: Checking Errors
1. During Compilation Compiler will check for error, If compiler finds any error then it will report it.
2. User have to re-edit the program.
3. After re-editing program, Compiler again check for any error.
4. If program is error-free then program is linked with appropriate libraries.
Step 4: Linking Libraries
1. Program is linked with included header files.
2. Program is linked with other libraries.
3. This process is executed by Linker.
Step 5: Error Checking
1. If run time error occurs then “Run-time” errors are reported to user.
2. Again programmers have to review code and check for the solution.