The steps for creating and running programs are: writing/editing, compiling, linking and execution. This can be viewed diagrammatically as shown below:
Writing/Editing: The first step in creating programs is, writing or editing the program. A program can be written in any text editor like notepad. After writing a program, the program must be saved, In C language, the program is saved with the extension “.c”. This is the source program written in a high-level language.
Compilation: After writing and saving the source program, the next step is compilation. Here we will use a software called as compiler, which converts a program written in high-level language into machine language. The resultant file is known as an object file in C. The extension of that file is “.obj”.
Linking: After compilation the next step is linking. Here software called linker is used. The linker links the program with external library files which contains the code for predefined functions and creates an executable file. The extension of the executable file is “.exe”.
Execution: Finally after the executable file is created after linking, the next step is execution. The operating system executes the executable file which is the machine code with the help of the CPU and other hardware components.
Latest posts by Suryateja Pericherla (see all)
- CPP program to rethrow an exception - 31/03/2017
- CPP program for handling divide by zero exception - 31/03/2017
- CPP program to create a function template for swapping - 31/03/2017