1.

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() functionis 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 occurThe question was asked during an interview for a job.My question is based upon General Utilities in division C Library of C

Answer»

The correct answer is (b) The atexit() functionis used to return ZERO if the registration succeeds, nonzero if it fails

Easiest EXPLANATION - The prototype of FUNCTION isint atexit (void (*FUNC) (void) );

The atexit() function is used to register the function POINTED to by func, to be called without arguments at normal program termination.



Discussion

No Comment Found

Related InterviewSolutions