#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 " ); }
//************ Sample program output ************
//Do this first.
//Do this last.
