What is Preprocessor, Compiler, Assembler, Link Editor
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
The C compiler translates source to assembly code. The
source code is received from the preprocessor.
The assembler creates object code. In MSDOS these are
object code files(.obj).
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.