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

Discussion

Which of the given statement is true with respect to the function atexit()?

  • A.The atexit() function cannot return to its caller
  • B.The atexit() function is used to return zero if the registration succeeds, nonzero if it fails
  • C.The atexit() function returns no value
  • D.The atexit() function causes abnormal program termination to occur

Answer: B

Correct answer: The atexit() function is used to return zero if the registration succeeds, nonzero if it fails

atexit() registers a function to be called when the program terminates normally, and returns zero on success. Registered functions run in the reverse order of registration, and at least 32 must be allowed. They are not called if the program ends through abort().

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

Post your comment

Please log in or register to post a comment.