LearnFrenzy
Sign in Take a free test

Error Handling · Error Handling MCQ · Question 5

Where are EXIT_SUCCESS and EXIT_FAILURE defined? Answer, explanation & discussion

  • MCQ
  • Easy
  • 0 comments
  • Answer explained
  • Moderated community
Question 5 Back to Exercise

Which header defines EXIT_SUCCESS and EXIT_FAILURE?

  • A <stdio.h>
  • B <errno.h>
  • C <stdlib.h> Correct
  • D <assert.h>
Correct Answer: Option C

They live in <stdlib.h> with exit, abort and atexit. Their values are implementation-defined, which is why they are more portable than 1 for failure.

Discussion & Comments 0

Share your method, a shortcut, or ask about a step you didn't follow.

No comments yet. Be the first to share your solution!

Post your comment

Comments appear after a quick review by our team.

Search LearnFrenzy

Esc

Quick links