it suppose to put all the ascii codes for 1 to 255 in the files and then read it back
it got stuck at i=26 in the reading process
10x
Code:#include <stdio.h>
void main()
{
FILE *fp;
int i;
int c;
fp=fopen("d:\\1.txt","w");
for(i=1;i<=255;i++)
{
fputc(i,fp);
}
fclose(fp);
fp=fopen("d:\\1.txt","r");
for(i=1;i<=255;i++)
{
c=fgetc(fp);
printf("%d\n",c);
}
fclose(fp);
}