Execution Flow of C Program:
Execution of a C Program is a step by step process which is discussed below.
Preprocessors:
Before compilation, the preprocessor starts processing the preprocessors directives first and generates an expanded source code.
Assembly Code:
The compiler than converts this expanded source code into an (.asm) assembly code.
Object Code:
After compilation, the assembler assembles the code and generates an (.obj) object code.
Executable Code:
After assembling, the linker links the object code to the library such as header files to convert it into an (.exe) executable code.
Console Display:
The final step is to load the executable code into memory via a loader. THe executable code is than executed and output is displayed on the console screen.
Example:
Hello.c Hello.i Hello.asm
Hello.obj Hello.exe CONSOLE