#include<stdio.h> #include<conio.h> #include<string.h> void main() { int ch; FILE *fptr; clrscr(); fptr=fopen("newtest1.txt","w++"); for(ch=0;ch<256;ch++) fprintf(fptr,"%c",ch); fclose(fptr); fptr=fopen("newtest1.txt","r++"); for(;;) { ch=fgetc(fptr); if(ch==EOF) break; printf("%d\t",ch); } getch(); }
0x1A
fgetc()
EOF
if( 0 != feof(fptr))
var
This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)