#include <stdio.h>
int main(void)
{
long fsize;
FILE *fp;
fp = fopen("d:\\data.bin","rb");
if (!fp)
{
printf("Unable to open file");
return 1;
}
fseek (fp , 0 , SEEK_END);
fsize = ftell(fp);
printf("file size = %ld", fsize);
fclose(fp);
return 0;
}
/*
run: (the size of d:\\date.bin)
file size = 12
*/