Compile and Link C Program


Prev Tutorial Next Tutorial

Compile and Link C Program

There are three basic phases occurred when we execute any C program.

  • Preprocessing
  • Compiling
  • Linking
Compiling Linking

Preprocessing Phase

A C pre-processor is a program that accepts C code with preprocessing statements and produces a pure form of C code that contains no preprocessing statements (like #include).

Preprocessing

Compilation Phase

The C compiler accepts a preprocessed output file from the preprocessor and produces a special file called an object file. Object file contains machine code generated from the program

Compiling

Linking Phase

The link phase is implemented by the linker. The linker is a process that accepts as input object files and libraries to produce the final executable program.

Linking
Prev Tutorial Next Tutorial

Advertisements




Facebook Likes

Advertisements