Steps to Prepare a C/C++ Program for Execution
- Creating and Editing
- Saving
- Compiling
- Linking
- Loading
- Executing
1- Creating and Editing
- Creating and Editing
- Saving
- Compiling
- Linking
- Loading
- Executing
1- Creating and Editing
The first step is to create and edit the source program. The program is usually written and edited in Turbo C/C++ editor.
2- Saving
After writing or editing the source code , it is saved on the disk. The extension of the file must be ".c".
3- Compiling
In this step, the source code is compiled. The source code is converted into machine code. The C-compiler is used to translate the program source code into the machine. After compiling source code, an object file with extension obj is created.
4- Linking
In this step, the linker link the object file to required library files. After linking the object code to the libraries, an executable file with extension EXE is created.
5- Loading
In this step, the loader load the executable file from the disk into memory for execution. The program must be loaded into memory for execution.
6- Execution
In this step, the program is executed on the computer. The CPU fetches instructions of program from memory one by one and taken action on them.
Following diagram show necessary that taken to prepare Program execution.
No comments:
Post a Comment
Thanks For Visiting Here...!! I will Reply you as soon as possible.