#include <stdio.h>
#include <conio.h>
#include <process.h>
int main(void)
{
FILE *pFile=NULL;
clrscr();
if((fFile=fopen("test.txt","w'))==NULL)
{
printf("Can't open file\n");
printf("Press any key to end");
getch();
exit(0);
}
else
{
fprintf(fFile,"hello world");
}
fclose(pFile);
printf("Please open the file \"test.txt\"");
getch();
}
/*这个程序没有运行,如果有问题请见谅.*/