Please note, this is a STATIC archive of website www.tutorialspoint.com from 11 May 2019, cach3.com does not collect or store any user information, there is no "phishing" involved.
Tutorialspoint

1 Answer
Anvi Jain

Here we will see how the C programs are executed in a system. This is basically the compilation process of a C program.

The following diagram will show how a C Source Code can be executed.

In the above diagram there are different steps −

C Code − This is the code that you have written. This code is sent to the Preprocessors section.

Preprocessing − In this section the preprocessor files are attached with our code. We have use different header files like stdio.h, math.h etc. These files are attached with the C Source code and the final C Source generates. (‘#include’, ‘#define’ These are Preprocessor Directives.)

Compiler − After generating the preprocessed source code, it moves to the compiler and the compiler generates the assembly level code after compiling the whole program.

Assembler − This part takes the assembly level language from compiler and generates the Object code, this code is quite similar to the machine code (set of binary digits).

Linker − Linker is another important part of the compilation process. It takes the object code and link it with other library files, these library files are not the part of our code, but it helps to execute the total program. After linking the Linker generates the final Machine code which is ready to execute.

Loader − A program, will not be executed until it is not loaded in to Primary memory. Loader helps to load the machine code to RAM and helps to execute it. While executing the program is named as Process. So process is (Program in execution).

Advertisements

We use cookies to provide and improve our services. By using our site, you consent to our Cookies Policy.