LOGBOOK

HELP

Quiz Entry - updated: 2026.07.07

What does the C preprocessor do?

It textually expands #includes and #define macros, emitting one large preprocessed source file before real compilation begins.

$ gcc -E p24.c > p24.pp.c

Before preprocessing:

#include <stdio.h>
#define N 1024
int main() {
    int A[N];
    ...
}

After preprocessing:

// Contents of stdio.h inserted here
int main() {
    // N replaced with 1024
    int A[1024];
    ...
}

The preprocessed file can be much larger (e.g., 270 bytes -> 48KB) due to included headers.

Go deeper:

From Quiz: REVE1 / Overview of Computer Systems | Updated: Jul 07, 2026