Compilation and Execution of C
Program, Character Set in C
Dr. Kumud Tripathi
,Steps for compiling and executing the C Programs
● The compilation is a process of converting the source code into object
code.
● If the source code is error-free, then compiler will generates the object
code or machine code.
● The compilation process can be divided into four steps, i.e.,
○ Preprocessing,
○ Compiling,
○ Assembling, and
○ Linking.
, Preprocessing
● The source code is the code which is written in a text editor and the
source code file is given an extension ".c".
● This source code is first passed to the preprocessor, and then the
preprocessor program expands this code.
● It removes comments, include header files in source code and replace
macro name with code.
● After expanding the code, the expanded code is passed to the compiler.