#include <stdlib.h>void exit(int exit_code);

The exit( ) function causes immediate, normal termination of a program. This means that termination functions registered by atexit( ) are called and any open files are flushed and closed.

The value of exit_code is passed to the calling process, usually the operating system, if the environment supports it. By convention, if the value of exit_code is zero, or EXIT_SUCCESS, normal program termination is assumed. A nonzero value, or EXIT_FAILURE, is used to indicate an implementation-defined error.

Related functions are atexit( ), abort( ), and _Exit( ).

C(s)C++ Programmer's Reference
C Programming on the IBM PC (C Programmers Reference Guide Series)
ISBN: 0673462897
EAN: 2147483647
Year: 2002
Pages: 539

flylib.com © 2008-2017.
If you may any questions please contact us: flylib@qtcs.net