exit

exit

Defined in header <stdlib.h>
void exit( int exit_code );
(until C11)
_Noreturn void exit( int exit_code );
(since C11)

Causes normal program termination to occur.

Several cleanup steps are performed:

  • functions passed to atexit are called, in reverse order of registration
  • all C streams are flushed and closed
  • files created by 登录查看完整内容