[求助]文件问题
为什么在B文件中是乱码main()
{FILE *p1,*p2;
int i=5,j;
int a[10],b[10];
if((p1=fopen("d:\\aa","w"))==NULL)
printf("the file can't open");
if((p2=fopen("d:\\bb","w"))==NULL)
printf("the file can't open");
for(i=0;i<10;i++)
{scanf("%c",&a[i]);
fputc(a[i],p1);}
rewind(p1);
for(i=0;i<10;i++)
{fputc(fgetc(p1),p2);
}
fclose(p1);
fclose(p2);