Mail Archives: djgpp/1995/06/20/16:05:25
If you execute this program after making a copy of the source in a
file called foozle, the expected result would be a seven character
file "foozle" containing the string "Yowza!". This is the case for
Linux, but the libc for v2.0 of DJGPP neglects to clobber the target
file "foozle" before writing.
/*
*/
#include <stdio.h>
#include <stdlib.h>
void main (void)
{
FILE* fp = fopen ("foozle", "w");
fprintf (fp, "Yowza!\n");
fclose (fp);
exit (0);
}
--
Marc Singer | The desert has little water.
elf AT netcom DOT com | The city has little time.
- Raw text -