Multiple choice

Which of the following statements is true about pre-processor directives?

  1. These are lines read and processed by the preprocessor.

  2. They do not produce any code by themselves.

  3. These must be written within the main program.

  4. They end with a colon.

Reveal answer Fill a bubble to check yourself
A Correct answer
Explanation

Preprocessor directives are lines processed by the preprocessor before compilation. They begin with # and include commands like #include, #define, #ifdef. Option A correctly states this. Option B is incorrect because directives like #define DO produce code (macro expansion). Option C is wrong because directives must be written BEFORE main, not within it. Option D is incorrect because directives don't end with colons - they're line-based.