1 #include <stdio.h> 2 3 int main() 4 { 5 FILE* fp; 6 if (fp = fopen("read files.exe", "r")) 7 { 8 fseek(fp, 0, SEEK_END);//SEEK_END :end of file 9 printf("%.1f KB ", 1.*ftell(fp)/1024); 10 fclose(fp); 11 } 12 return 0; 13 }