The conditional expansion facility of macro processors is provided to

1997

The conditional expansion facility of macro processors is provided to

  1. A.

    test a condition during the execution of the expanded program

  2. B.

    expand certain model statements depending on the value of a condition during execution of the expanded program

  3. C.

    implement recursion

  4. D.

    expand certain model statements depending on the value of a condition during macro expansion

Attempted by 49 students.

Show answer & explanation

Correct answer: D

A macro processor expands macro calls before the generated program is executed. Conditional expansion is a facility that lets a macro definition expand different model statements depending on a condition evaluated during the macro-expansion process.

Therefore, it is not meant to test run-time conditions in the expanded program. It is used to control which statements are produced while the macro processor is expanding the macro.

Hence, the correct option is that it expands certain model statements depending on the value of a condition during macro expansion.

Explore the full course: Gate Guidance By Sanchit Sir