The C Preprocessor is a macro processor that commands the compiler to do required pre-processing before the actual compilation begins. All Preprocessor Commands begin with # Symbol.
The Preprocess actually process the source code before it is compiled by the compiler.
Examples of C Preprocessor
- #include [Inserts a particular header from another file]
- #define [Substitutes a preprocessor macro]
- #undef [Undefines a preprocessor macro]
- #ifdef [Returns true if this macro is defined]
- #ifndef [Returns true if this macro is not defined.]
- #if [Tests if a compile time condition is true.]
- #else [The alternative for #if]
- #elif [else and #if in one statement.]
- #endif – [Ends preprocessor conditional]
- #error – [Prints error message on stderr]
- #pragma [Issues special commands to the compiler, using a standardized method]