The steps for creating and running programs are: writing/editing, compiling, linking and execution. This can be viewed diagrammatically as shown below:

 

creating-running-cprograms

 

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.

https://youtu.be/iK0d81fykQ8

First programme in C in Windows



First programme in C in Linux

                                            Creating and Executing a C Program

Comments

Popular posts from this blog

INTRODUCTION TO C

C Tokens

Structure of a C Program