The preprocessor is another unique feature of the c language that is generally not found in other high-level programming languages. the preprocessor provides a number of facilities to the programmer like.
- Program development process becomes easy.
- Simplifies modification in a program, reducing much agony.
- Portability of programs increases.
- Readability of program increases.
- Can develop efficient program easily.
The preprocessor program is a part of your turbo C compiler but as its name implies, it processes the source code before passing it to the compiler. This can be depicted as :
C source code
!
C source code after expansion
!
object code
!
executable code
The actions of the preprocessor are governed by preprocessor directives placed in the source file. A preprocessor directive always begins with the character # on a new line. It can be continue on the next line by using the backslash character.
Preprocessor directives can be classified into four categories:
- Macro substitution directives.
- File inclusion directives.
- Conditional compilation directives.
- Miscellaneous directives.
Comments
Post a Comment