Use C abort function to immediately terminate a program
Syntax
C abort function has the following syntax.
void abort(void);
Header
C abort function
is from header file stdlib.h
.
Description
The abort()
function causes immediate abnormal termination of a program.
Example
Use C abort function to terminate a program.
#include <stdlib.h>
#include <stdio.h>
//ww w . j a v a2s .c om
int main(void)
{
abort();
return 0;
}
The code above generates the following result.