HOw to find the eof of a file in c