🦄 refactor(C13, C14, C115): 更新了linux系统开发部分的结构

This commit is contained in:
lzy
2024-05-16 20:36:01 +08:00
parent cb969dfd41
commit 60d670d130
53 changed files with 1407 additions and 1246 deletions

37
C14-文件系统/atexit.c Normal file
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!