#include "stdio.h"
int main()
{
FILE *fp,*fp1;
if((fp=fopen("e:\abc.txt","r"))==NULL)//这个我提前创建过了
{
printf("Cannot open the file\n");
getchar();
return 1;
}
if((fp1=fopen("e:\bcd.txt","w+"))==NULL)
{
printf("Cannot find the file\n");
getchar();
return 1;
}
char ch;
ch=fgetc(fp);
while(ch!=EOF)
{
putchar(ch);
fputc(ch+1,fp1);
ch=fgetc(fp);
}
putchar('\n');
rewind(fp1);
ch=fgetc(fp1);
while(ch!=EOF)
{
putchar(ch);
ch=fgetc(fp1);
}
putchar('\n');
fclose(fp);
fclose(fp1);
return 0;
}
为什么后面多了好几个框呢,求解