fread() returns 0 and feof() returns non zero. I have to use standard C.