🦄 refactor(C14, C15):

This commit is contained in:
lzy
2024-05-16 21:57:14 +08:00
parent 60d670d130
commit b66e536177
34 changed files with 2 additions and 0 deletions

View File

@@ -0,0 +1,37 @@
#include <stdio.h>
#include <stdlib.h>
static void f1(void)
{
puts("f1() is working!");
}
static void f2(void)
{
puts("f2() is working!");
}
static void f3(void)
{
puts("f3() is working!");
}
int main(int argc, char **argv)
{
puts("Begin!");
atexit(f1);
atexit(f2);
atexit(f3);
puts("End!");
exit(0);
}
// out:
// *[main][~/Linux-C-Notes/C13-Linux系统编程/fs]$ ./atexit
// Begin!
// End!
// f3() is working!
// f2() is working!
// f1() is working!