"Z Code Writer" is an Online Blog for Programmer & Beginner. Here, You will Find tech, Build your Programming Skills and other Programming Language Like C, C++, HTML, Java Script Java Code, Web Designing and University Of Sialkot (USKT) CGPA / GPA Calculator etc.

Thursday, 27 June 2019

Necessary Steps to Prepare a C/C++ Program for Execution

Steps to Prepare a C/C++ Program for Execution

  1. Creating and Editing 
  2. Saving 
  3. Compiling
  4. Linking
  5. Loading
  6. 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.