2. Basic Steps of execution
Creating the program
Compiling the program
Link the program with functions that are needed from c library
Executing the program
4. Editor or IDE
IDE — that's an integrated development environment, it is the piece
of software that acts as text editor, debugger and compiler all in one.
Example:
Eclipse
NetBeans
CodeLite
Bloodshed Dev-C++
Code::Blocks
C-Free
5. Preprocessor
The C Preprocessor is not a part of the compiler, but is a separate step in the
compilation process. In simple terms, a C Preprocessor is just a text
substitution tool and it instructs the compiler to do required pre-processing
before the actual compilation. We'll refer to the C Preprocessor as CPP.
Preprocessors Examples
#define MAX_ARRAY_LENGTH 20
#include <stdio.h> #include "myheader.h“
#define square(x) ((x) * (x))
6. Compiler
A compiler is a software program that transforms high-level source code that is written by a developer
in a high-level programming language into a low level object code (binary code) in machine language,
which can be understood by the processor.
A compiler translates the code written in one language to some other language without changing the
meaning of the program.
Example: GCC Compiler
Special type of compilers
source-to-source compiler
Bytecode compilers or Warren Abstract Machine (or WAM).
Just-in-time compiler (JIT compiler)
7. Linker
In high level languages, some built in header files or libraries are stored. These libraries are
predefined and these contain basic functions which are essential for executing the program.
These functions are linked to the libraries by a program called Linker.
If linker does not find a library of a function then it informs to compiler and then compiler
generates an error. The compiler automatically invokes the linker as the last step in compiling a
program.
it also links the user defined functions to the user defined libraries. Usually a longer program is
divided into smaller subprograms called modules. And these modules must be combined to
execute the program. The process of combining the modules is done by the linker.
8. Loader
Loader is a program that loads machine codes of a program into the system
memory. In Computing, a loader is the part of an Operating System that is responsible for loading
programs.
It is one of the essential stages in the process of starting a program. Because it places programs
into memory and prepares them for execution.
Loading a program involves reading the contents of executable file into memory. Once loading is
complete, the operating system starts the program by passing control to the loaded program
code.
All operating systems that support program loading have loaders. In many operating systems the
loader is permanently resident in memory.
9. CPU
CPU (pronounced as separate letters) is the abbreviation for central processing unit. Sometimes
referred to simply as the central processor, but more commonly called processor, the CPU is the brains
of the computer where most calculations take place. In terms of computing power, the CPU is the most
important element of a computer system.
A central processing unit (CPU) is the electronic circuitry within a computer that carries out the
instructions of a computer program by performing the basic arithmetic, logical, control and
input/output (I/O) operations specified by the instructions.
In anotther way we can say
A Central Processing Unit, or CPU, is the piece of hardware in a computer that carries out computer
programs by performing arithmetical and logical operations. The CPU of a modern computer is
contained on a single chip called a microprocessor. Some computers have more than one CPU, a
development known as microprocessing.
11. Assembler
A computer will not understand any program written in a language, other than its
machine language. The programs written in other languages must be translated into
the machine language. Such translation is performed with the help of software.
A program which translates an assembly language program into a machine language
program is called an assembler.
If an assembler which runs on a computer and produces the machine codes for the
same computer then it is called self assembler or resident assembler. If an assembler
that runs on a computer and produces the machine codes for other computer then it
is called Cross Assembler.
12. For more help
If you want to know details about IDE, PREPROCESSOR,
COMPILER, LINKER, LOADER,
ASSEMBLER, and CPU go to the individual video