Next Previous Contents

## 3.58 exit

> Function

>   Terminate the program.

> Header

>   `stdlib.h`

> Declaration

>   `void __fastcall__ exit (int status);`

> Description

>   `exit` terminates the program. The argument specifies the return code of the program. Before termination, all files are closed, buffered output is written and any functions registered with `atexit` are called. Common values for status are `EXIT_SUCCESS` and `EXIT_FAILURE` which are also defined in `stdlib.h`.

> Limits

>   - The function is only available as fastcall function, so it may only be used in presence of a prototype.
>   - It depends on the host machine if the program return code can be evaluated or is ignored.
> Availability

>   ISO 9899

> See also

>   abort, exit

> Example

>   None.

Next Previous Contents