The C preprocessor


The C preprocessor
* The C Preprocessor is a separate step in the compilation process, but not part of the compiler.

The C preprocessor.
  • All preprocessor lines always begin with #.
The unconditional directives are as follows:
    • #define – Define a preprocessor macro
    • #include – Insert a particular header from another file
    • #undef – Undefine a preprocessor macro
The conditional directives are as follows:
    • #ifndef – If this macro is not defined
    • #ifdef – If this macro is defined
    • #if – Test if a compile time condition is true
    • #elif – #else an #if in one statement
    • #else – The alternative for #if
    • #endif – End preprocessor conditional

Followers