No worries, I figured it out.
The problem was with the fread() function.
Basically, I was asking it to read 8 times the data inside the array 'a'.
So, like,
instead of;
readcount = fread( a, sizeof( a ), 8, fp);
I used;
readcount = fread( a, sizeof( a ), 1, fp);
And this extracted all the...