Preprocessors process directives before compilation.
#include <stdio.h> // system header #include "myheader.h" // user header
#define PI 3.14159 #define MAX(a,b) ((a) > (b) ? (a) : (b))
#ifdef DEBUG printf("Debug mode\n"); #endif #if VERSION == 1 // version 1 code #elif VERSION == 2 // version 2 code #endif
#undef PI