Search This Blog

Loading...

abort

Abnormally terminates a process
Declaration:  void abort(void);

Remarks:
abort writes a termination message on stderr ("Abnormal program
termination"), then aborts the program by a call to _exit with exit code 3.
 

#include <stdio.h>
#include <stdlib.h>

int main(void)
{
  printf("Calling abort()\n");
  abort();
  return 0; /* This is never reached */
}

No comments:

Post a Comment