Flow of C Program

There are several steps involved from the stage of writing a C program to the stage of getting it executed.
All these steps of flow of c program are shown in following diagram,

flow of c program

Steps of flow of C program

  • You can observe from the figure that our program passes through several processors before it is ready to be executed.
  • As shown in figure, source code is a hand written code by programmer and it is stored with .c extension.
  • Then preprocessor replaces #include(files), #define(macro) etc by their respective values.
    This expanded source code gets stored in a file with .i extension.
  • When this expanded source code is compiled, it produce object code and this object code gets stored with .o extension.
  • After this object code is transfer to linker. Linker linked the object code of library functions.
  • The resultant executable code gets stored with .exe extension.

In this way, we are executing any program. Each program goes through these steps.

Help others by sharing the content!

Leave a Comment

This site uses Akismet to reduce spam. Learn how your comment data is processed.