Execution flow of C program

There are various steps of the execution of the C program that is given below.

The following step of the execution

  1. Write source codes
  2. Preprocess
  3. Compile
  4. Link edit
  5. Load
  6. Execute

Editor or IDE:

This is the first step while writing the source codes of the program, there must require any editor or IDE (like notepad and notepad++ etc) where we can write own source code and save it by using source codes (.c) and headers ( .h).

Preprocessor:

In this section, the source code includes the file and replaces the symbols and send to the next section compiler.

Compiler:

In this section, the compiler compiles the source code of the program and creates the object codes (.obj and .o)and sends to the linker.

Linker:

In this section, the linker links the object codes into static libraries (.dll and .so) and creates the executable code (.exe).

Loader:

In this section, the loader loads the executable code by using shared libraries (.dll and .so)file and send to the CPU for execution according to user input and return output.

11.3.17

Leave a Comment