#include <stdio.h>
main()
{
char ch1;
FILE *fp;
fp=fopen("d:\\file","w");
if(fp==NULL)
{
printf("\n can't open the file\n");
getch();
exit(0);
}
printf("%d\n",fp);
ch1=getchar();
while(ch1!='$')
fputc(ch1,fp);
fclose(fp);
fp=fopen("d:\\file","r");
ch1=fgetc(fp);
while(ch1!=EOF)
{
putch(ch1);
ch1=fgetc(fp);
}
fclose(fp);
getch();
}
PIPIONE
叮当猫咪
当年话下
相关分类