This repository has been archived on 2024-12-16. You can view files and clone it, but cannot push or open issues or pull requests.
CodeBlocksPortable/WATCOM/samples/clibexam/onexit.c

17 lines
327 B
C

#include <stdio.h>
#include <stdlib.h>
void main()
{
void func1(void), func2(void), func3(void);
onexit( func1 );
onexit( func2 );
onexit( func3 );
printf( "Do this first.\n" );
}
void func1(void) { printf( "last.\n" ); }
void func2(void) { printf( "this " ); }
void func3(void) { printf( "Do " ); }