abort function(Abort Program) in C Language – example and detail

In the C Programming Language, the abort feature raises the SIGABRT signal, and reasons strange program termination that returns an implementation defined code indicating unsuccessful termination. Functions registered with atexit are not called.

The following can also occur: file buffers are not flushed, streams are not closed, and transient archives are no longer deleted.

Syntax

The syntax for the abort feature in the C Language is:

void abort(void);

Returns

The abort function does not return anything.

Required Header

In the C Language, the required header for the abort function is:

#include <stdlib.h>

Applies To

In the C Language, the abort feature can be used in the following versions:

ANSI/ISO 9899-1990

Similar Functions

Other C features that are similar to the abort function:

exit feature raise function

See Also

Other C features that are noteworthy when dealing with the abort function:

assert macro atexit feature signal characteristic