//读入文件实例
#include <stdio.h>
#include <stdlib.h>
void main()
{
FILE *fp;
char ch;
if((fp=fopen("1.txt","rt"))==NULL)
{
printf("\nCannot open file strike any key exit!");
getch();
exit(1);
}
ch=fgetc(fp);
while(ch!=EOF)
{
putchar(ch);
ch=fgetc(fp);
}
fclose(fp);
}
03-23
991
07-20
4万+