C语言库函数atexit

C语言库函数atexit函数名: atexit功 能:注册终止函数函数与形参类型:int atexit(atexit_t func);程序例:#include #include void exit_fn1(void){printf("Exit function #1 called ");} void exit_fn2(void){printf("Exit function #2 called ");} int main(void){/* post exit function #1 */atexit(exit_fn1);/* post exit function #2 */atexit(exit_fn2);return 0;}

以上内容由大学时代综合整理自互联网,实际情况请以官方资料为准。

相关