I have a file. I read the size of file. Then I loop reading two bytes at a time until I get to the end of the file. After every read ...
I've read posts that show how to use fseek and ftell to determine the size of a file.
FILE *fp; long file_size; char *buffer; fp = fopen("foo.bin", "r"); if (NULL == fp) { /* Handle ...