/* File: buffer2.c
   Demonstrates that buffered output does not
   get written out after a crash.
*/

#include <stdio.h>

main() {
   int *ptr ;
   FILE *ofile ;

   ofile = fopen("output", "w") ;
   fprintf(ofile, "Hello World\n") ;
   fprintf(ofile, "Hello again") ;

   /* Crash Burn Die */
   ptr = NULL ;
   *ptr = 123 ;

   fclose(ofile) ;
}
