Machine-translated by Google. Questions are authored in English.
Top

Discussion

Preprocessor directive #undef can be used only on a macro that has been #define earlier

  • A.True
  • B.False

Answer: A

Correct answer: True

#undef does one thing: it removes an existing macro definition. Applied to a name that was never defined it has nothing to remove and is simply ignored, so the directive is meaningful only for a macro defined earlier. Its usual purpose is to redefine a macro safely - #undef then #define - or to stop a macro shadowing a real function name.

No comment is present. Be the first to comment.
Loading…

Post your comment

Please log in or register to post a comment.