C examples for Preprocessor:Preprocessor Operators
The preprocessor does text substitution within the source code before the source is compiled.
The preprocessor are all start with a hash sign #.
The preprocessor must appear as the first non-whitespace character on a line and they do not need to end with a semicolon.
The following table shows the preprocessor directives available in C.
Directive | Description |
---|---|
#include | File include |
#define #undef | Define macro Undefine macro |
#ifdef #ifndef | If macro defined If macro not defined |
#if #elif #else #endif | If Else if Else End if |
#line #error #pragma | Set line number Abort compilation Set compiler option |