I know when the address of the function is passed to atexit function, the function is excuted.
atexit
#include int atexit(void (*fun
Yes, atexit is related to exit.
exit
exit can call functions which are automatically called before a program exits. These functions are called exit handlers and are registered by calling atexit function.
#include main(void) { atexit(func); } func(void) { ... }