#include <stdio.h> #include <dos.h> #define ABORT 0 int c_break ( void ) { printf ( "Control-Break pressed. Program aborting ...\n" ); return ( ABORT ); } int main ( void ) { ctrlbrk ( c_break ); for ( ;; ) { printf ( "Looping... Press <Ctrl-Break> to quit:\n" ); } return 0; }