Skip to main content

Practice ยท 1 of 4

Watch the Preprocessor

CHALLENGE
Difficulty: advanced+25 XP

Implement int pipeline_probe(void): define a macro #define GROW(n) ((n) + 1) and return GROW(GROW(4)) โ€” then verify by hand what the preprocessor produced: the expansion is ((4) + 1) + 1. Also implement const char *include_probe(void) returning __FILE__ โ€” the preprocessor's own record of the translation unit.

Back to lesson: Practice: Pipeline Drills