There are various steps of the execution of C program is given below :-
Preprocessor: In this section the source code are written in text editor and the source code file is given an extension “.c” This source code is first passed to the preprocessor and then the preprocessor expands this code. After expanding the code the expanded code is passed to the compiler.
Compiler: In this section we can see the code which is expanded by the preprocessor is passed to the compiler.The compiler converts this code into the assembly code and sends to the assembler.
Assembler: The assembly code is sent to assembler which assembles the code and converts it into the object code.The name of the object file generated by the assembler is the same as the source file. Now a simple.obj file is generated.The extension of the object file is DOS is ‘.obj’ and in UNIX the extension is ‘o’.
Linker: The main working of the linker links the object code into static libraries and the executable code(.exe). the output of the linker is the executable file.The name of the executable file is the same as the source file but differs only in their extensions.
Loader: In this section, the loader loads the executable code by using shared libraries file and send to the CPU for execution according to user input and return output.