atexit
来源:互联网 发布:男生身高 知乎 编辑:程序博客网 时间:2024/04/28 22:10
Example
This program pushes four functions onto the stack of functions to be executed when atexit is called. When the program exits, these programs are executed on a last in, first out basis.
// crt_atexit.c
#include <stdlib.h>
#include <stdio.h>
void fn1( void ), fn2( void ), fn3( void ), fn4( void );
int main( void )
{
atexit( fn1 );
atexit( fn2 );
atexit( fn3 );
atexit( fn4 );
printf( "This is executed first./n" );
}
void fn1()
{
printf( "next./n" );
}
void fn2()
{
printf( "executed " );
}
void fn3()
{
printf( "is " );
}
void fn4()
{
printf( "This " );
}
Output
This is executed first.
This is executed next.
- atexit
- atexit
- atexit
- atexit
- atexit
- atexit
- atexit
- atexit
- atexit
- atexit
- atexit()
- atexit()
- atexit
- atexit()
- atexit
- atexit.c
- atexit函数
- atexit 函数
- 正在读《Build your own dot net language and compiler》
- 如何根据日期得知是星期几
- 旋转的技巧 PowerPoint中对象旋转更加轻松
- 生产领料单问题。
- vc静态变量构造析构顺序
- atexit
- 给PowerPoint按钮加上提示文字
- 论坛集
- 偶刚刚接触的BSD
- Entrance to the Science of Computing
- 最美的十大经典爱情句子
- 远程培训教程之POWERPOINT2003
- 新手接单基本防骗方法(转)
- 邂逅JAVA虚拟机