0% found this document useful (0 votes)
5 views1 page

Preprocessing

Uploaded by

awahannabel
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as DOCX, PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
5 views1 page

Preprocessing

Uploaded by

awahannabel
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as DOCX, PDF, TXT or read online on Scribd
You are on page 1/ 1

.

Preprocessing: The First Step

At the outset, the C preprocessor comes into play. It handles preprocessor directives, which
begin with a '#' symbol, and includes header files in the code. When you use #include <stdio.h>,
for example, the preprocessor replaces it with the content of the stdio.h file. This step generates
an intermediate code with all the necessary declarations and macros.

2. Compilation: Translating to Assembly

Once preprocessing is complete, the actual compilation commences. The compiler takes the C
code and translates it into assembly code, specific to the target platform. Assembly code
represents a low-level view of the program, consisting of instructions that the processor can
execute.

3. Assembly: From Assembly to Machine Code

Next, the assembler converts the assembly code into machine code, also known as object code.
The object code consists of binary representations of instructions and data. This step is a crucial
bridge between human-readable code and the language the computer understands.

4. Linking: Bringing It All Together

Now that we have object files with machine code, the linker takes center stage. It resolves
external dependencies, such as functions from libraries or other object files, and combines all the
object files into a single executable. The linker ensures that the final program is self-contained
and ready to run.

You might also like