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

Discussion

The purpose of the preprocessor directive #error is that ____________

  • A.It rectifies any error present in the code
  • B.It rectifies only the first error which occurs in the code
  • C.It causes the preprocessor to report a fatal error
  • D.It causes the preprocessor to ignore an error

Answer: C

Correct answer: It causes the preprocessor to report a fatal error

#error message makes the preprocessor stop with a diagnostic. It is used to fail loudly when a configuration makes no sense - for example #if !defined(__STDC__) followed by #error This code requires a standard C compiler - rather than letting the build produce something broken.

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

Post your comment

Please log in or register to post a comment.