Go to the first, previous, next, last section, table of contents.


exit

Syntax

#include <stdlib.h>

void exit(int exit_code);

Description

This function exits the program, returning exit_code to the calling process. Before exiting, all open files are closed and all atexit and on_exit requests are processed.

Return Value

This function does not return.

Portability

ANSI, POSIX

Example

if (argc < 4)
{
  print_usage();
  exit(1);
}


Go to the first, previous, next, last section, table of contents.