Skip to content
Official PYQ · 1997

GATE CS 1997 Q1.9 — Lexical Analysis

Explain with AI

The conditional expansion facility of macro processor is provided to

Choose one option
View worked solution

Answer: D

A macro processor is a preprocessor that performs text substitution (macro expansion) before the source program is compiled, assembled, or executed.

Let us analyze the options based on when macro processing occurs:

  • Macro Expansion Time vs. Execution Time: Any conditional logic evaluated by the macro processor (such as conditional assembly directives or preprocessor directives like #if / #ifdef in C) is resolved entirely during the macro expansion phase (at compile/assembly time).
  • Execution Time: Conditions evaluated during the execution of the expanded program are handled by standard runtime control flow statements (like if-else in C or conditional jumps in assembly), not by the macro processor.

Therefore, the conditional expansion facility is used to selectively expand certain model statements based on a condition evaluated during the process of macro expansion.

Hence, Option D is the correct answer.

Free practice · Your answers on this page are not saved.

Published
Report a correction
Keep exploringMore Lexical Analysis questions