What is Preprocessor, Compiler, Assembler, Link Edito



What is Preprocessor, Compiler, Assembler, Link Editor

The Preprocessor

The Preprocessor accepts source code as input and is responsible for
·                     removing comments
·                     interpreting special preprocessor directives denoted by #.
For example
·                     #include -- includes contents of a named file. Files usually called header files. e.g
o        #include <math.h> -- standard library maths file.
o        #include <stdio.h> -- standard library I/O file
·                     #define -- defines a symbolic name or constant. Macro substitution.
o        #define MAX_ARRAY_SIZE 100

C Compiler

The C compiler translates source to assembly code. The source code is received from the preprocessor.

Assembler

The assembler creates object code. In MSDOS these are object code files(.obj).

Link Editor

If a source file references library functions or functions defined in other source files the link editor combines these functions (with main()) to create an executable file. External Variable references resolved here also.

Labels: