Home > Programming In C > Compilation And Execution Of A C Program

Compilation And Execution Of A C Program

Compilation And Execution Of A C Program – Write A Program Using Editor, Save The File With .C Extention, To Compile The Program, We Can Select Compile From The Menu And Press Enter Or You Can Press Alt+f9.

It Will Check The Errors If The Program Has Any Error It Will Terminate The Program Then We Can Find Out The Error And We Can Correct The Error.

After Correcting The Error We Can Compile The Program Again.

After Compiling Successfully It Will Create A Object(.obj) File.

Once The Source Program Has Been Converted Into An Object File, It Is Not In The Form We Can Run.

The Reason Behind This Is That There May Be Some References To Standard Library Functions Or User-defined Functions In Other Object Files Which Are Compiled Separately.

Therefore These Object Files Are To Be Linked Together Along With Standard Library Functions That Are Contained In-Library Files.

To Link owe Object Files, Select Link From The Compile Menu.

After This, The .obj File Will Be Compiled With The One Or More Library Files.

The Result Of This Linking Process Produces An Executable File With .exe Extension.

.exe File Is A Stand-Alone Executable File Which Can Direct Execute From Command Prompt.

After Pressing Alt+f9, It Will Complete The Whole Process Creating .obj And .exe

To Display The Output Of The Program Press Alt+f5

Leave a Reply

Secured By miniOrange