Programming Puzzle --Write a Code that executes certain function only at Program termination

Use atexit( ) function as shown in following program.

#include
main( )
{
int ch ;
void fun ( void ) ;
atexit ( fun ) ;
// code
}
void fun( void )
{
printf ( "\nTerminate program......" ) ;
getch( ) ;
}

No comments:

 
Top Blogs