Follow along with the video below to see how to install our site as a web app on your home screen.
Note: This feature may not be available in some browsers.
7.20.4.1 The abort function
Synopsis
#include <stdlib.h>
void abort(void);
Description
The abort function causes abnormal program termination to occur, unless the signal SIGABRT is being caught and the signal handler does not return. Whether open streams with unwritten buffered data are flushed, open streams are closed, or temporary files are removed is implementation-defined. An implementation-defined form of the status unsuccessful termination is returned to the host environment by means of the function call raise(SIGABRT).
Returns
The abort function does not return to its caller.
For tutorials and examples, grab your nearest good C book.7.20.4.3 The exit function
Synopsis
#include <stdlib.h>
void exit(int status);
Description
The exit function causes normal program termination to occur. If more than one call to the exit function is executed by a program, the behavior is undefined.
First, all functions registered by the atexit function are called, in the reverse order of their registration) except that a function is called after any previously registered functions that had already been called at the time it was registered. If, during the call to any such function, a call to the longjmp function is made that would terminate the call to the registered function, the behavior is undefined.
Next, all open streams with unwritten buffered data are flushed, all open streams are closed, and all files created by the tmpfile function are removed.
Finally, control is returned to the host environment. If the value of status is zero or EXIT_SUCCESS, an implementation-defined form of the status successful termination is returned. If the value of status is EXIT_FAILURE, an implementation-defined form of the status unsuccessful termination is returned. Otherwise the status returned is implementation-defined.
Returns
The exit function cannot return to its caller.