编写一个 C 程序来检查 atexit() 函数
该atexit()函数允许用户注册必须根据程序终止调用的函数。
它是包含在stdlib头文件中的预定义函数。
示例1
#include输出结果#include void welcome(void){ printf("Welcome to New,"); } void world(void){ printf("World\n"); } int main(){ //测试atexit,调用用户定义的函数 atexit(world); atexit(welcome); return 0; }
Welcome to New,World
示例2
#include输出结果#include void first(void){ printf("This is a beautiful,"); } void second(void){ printf("Wonderful life\n"); } int main(){ //测试atexit,调用用户定义的函数 atexit(second); atexit(first); return 0; }
This is a beautiful,Wonderful life
热门推荐
1 训练狗狗憋尿
2 狗狗追踪训练
3 狗狗训练要多少钱
5 深圳狗狗训练
6 训练狗狗唤回
7 狗狗叫怎么训练
8 狗狗训练班
10 狗狗社会化训练
11 狗狗叫回训练
12 广州狗狗训练学校
13 狗狗训练躺下
14 狗狗随行训练
15 训练狗狗巡回
16 狗狗要怎么训练
17 狗狗喂食训练
18 训练狗狗躺下