//读入文件实例
#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);
}
C 读入文件实例
猜你喜欢
转载自blog.csdn.net/qq_48167493/article/details/120555666
今日推荐
周排行