# ATEXIT function

atexit regesters a function to be executed when the program terminates normally.

    	Library:   stdlib.h

    	Prototype: int atexit(void (*function)(void));

    	Syntax:    void End(void);

                       main()
                       {
                         atexit(End);
                       }

                       void End(void)
                       {
                         printf("The End\n");
                       }

Please see function pointers for information on how this works.

## Examples:

example program.

## See Also:

exit function.

abort function.

Top | Master Index | Keywords | Functions