#include<stdio.h>
#include<stdlib.h>
int main(void)
{
FILE *fp;
char str[11],*cp=NULL;
1 分
=fopen("output.txt",1 分
);
if(1 分
==NULL)
{ printf("打开文件失败\n");
exit(0);
}
1 分
=fgets(1 分
);
while(cp!=NULL)
{
printf("%s",1 分
);
1 分
=fgets(1 分
);
}
1 分
;
return 0;
}
fp
"r"
fp
cp
str,11,fp
str
cp
str,11,fp
fclose(fp)