Compilation Process in C Language
×


Compilation Process in C Language

401

The compilation process in C transforms Source Code into Executable Programs.

It has the Preprocessing, Compilation, Assembly, and Linking stages.

The compilation process in C language has several stages.

1Preprocessing

2Compilation

3Assembly

4Linking stage

Compilation Process in C Language

Preprocessing

The Initial stage handles processor directives such as #include and #define.

It expands macros, includes Header Files, and also Removes Comments.

Preprocessed code is saved with a '.i' extension.

Compilation

The compiler translates Preprocessed Code into the Object Language.

A syntax error is detected and an object code file is generated in this process.

At this stage, the correctness of the code is detected and then it generates intermediate code.

Assembly

The Assembler Converts Assembly Code into Machine Language.

It Uses Assembler to Convert Human-Readable Language to Binary Instructions.

This produces an object file that contains machine code and relocation information.

Linking Stage

The final stage is the linking stage where all necessary Object Files and Libraries are linked.

The linker generates an Executable File or a Shared Library.

It also performs Optimization and Address Relocation.

The Following Steps are taken to Execute the C Program

Compilation Process in C



Best WordPress Hosting


Share:


Discount Coupons

Get a .COM for just $6.98

Secure Domain for a Mini Price



Leave a Reply


Comments
    Waiting for your comments