Flow of C program

Compilation and execution process/flow:

The C program follows many steps in execution. TO understand the Flow of C Program well see the program.

File: FOP.c

//program to understand flow of C Program!

#include<stdio.h>
int main()
{
printf("Flow of C Program!");
return 0;
}


  • C program (foc.c) first sent to preprocessor.The proprocessor is responsiable to generates an expanded source code.
  • Expanded source code is sent to compiler which compile it and convert it into assembly code.
  • Assembly code sent to assembler which assemble the code and convert it into object code.
  • Object code is sent to linker which link it to header files and convert it into executable code. Now FOC.exe file generate.
  • Executable code sent to loader which load it into memory and then it is execute. after execution output is produce on scrren.