QP School

Full Version: Preprocessor directives in C
You're currently viewing a stripped down version of our content. View the full version with proper formatting.
Preprocessor directives are instructions to the compiler before actual compilation.
// #define directive for a macro
#define PI 3.14159

// #include directive to include a header file
#include <stdio.h>

// Other preprocessor directives
#ifdef DEBUG
    printf("Debug mode\n");
#else
    printf("Release mode\n");
#endif