• Compilation: Compilation makes sure that the source
code follows Syntax. Compilation error will be given if any
code doesn’t follow Syntax.
• Execution: Execution is the process of executing the .exe
file of windows or .extension file of different Os. The code
which has been converted to binary code will be executed
to run the Application.
• Computers understand machine language composed of 0
& 1. Humans understand alphabet that form words. There
are two ways of trsnslating computer language (readable
to humans) into machine language (understood by
computers). Compiler or Interpreter convert programs (c+
+, java etc) into EXECUTABLE code so the computer can
perform the functions in the program.
Compilation process in C involves four steps:
• Preprocessing
• Compiling
• Assembling
• Linking
Pre-Processing
• Pre-Processing
• Pre-processing is the first step in the compilation process
in C performed using the pre-processor tool (A pre-written
program invoked by the system during the compilation).
All the statements starting with the # symbol in a C
program are processed by the pre-processor, and it
converts our program file into an intermediate file with no
# statements. Under following pre-processing tasks are
performed : COMMENTS ELIMANTED,
» MACROS EXXANED
COMPILING
• SYNTAX ERRORS
• WARNINGS
Assembling
• Assembly level code (.s file) is converted into a machine-
understandable code (in binary/hexadecimal form) using an
assembler. Assembler is a pre-written program that translates
assembly code into machine code. It takes basic instructions
from an assembly code file and converts them into
binary/hexadecimal code specific to the machine type known as
the object code.
• The file generated has the same name as the assembly file and
is known as an object file with an extension of .obj in DOS
and .o in UNIX OS.
Linking
• Linking is a process of including the library files into our
program. Library Files are some predefined files that contain
the definition of the functions in the machine language and
these files have an extension of .lib. Some unknown statements
are written in the object (.o/.obj) file that our operating system
can't understand. You can understand this as a book having
some words that you don't know, and you will use a dictionary
to find the meaning of those words. Similarly, we use Library
Files to give meaning to some unknown statements from our
object file. The linking process generates an executable file with
an extension of .exe in DOS and
STEP WISE: CONVERTING