/*********************************************************************************
|
* Copyright: (C) 2025 LingYun IoT System Studio
|
* All rights reserved.
|
*
|
* Filename: atexit.c
|
* Description: This file atexit() example program.
|
*
|
* Version: 1.0.0(10/29/2025)
|
* Author: Guo Wenxue <guowenxue@gmail.com>
|
* ChangeLog: 1, Release initial version on "10/29/2025 03:43:29 PM"
|
*
|
********************************************************************************/
|
|
#include <stdio.h>
|
#include <stdlib.h>
|
|
void f1(void) { printf("f1 called\n"); }
|
void f2(void) { printf("f2 called\n"); }
|
void f3(void) { printf("f3 called\n"); }
|
|
int main(void)
|
{
|
atexit(f1);
|
atexit(f2);
|
atexit(f3);
|
printf("main end\n");
|
return 0;
|
}
|