What does you manual say that fopen will do if it successfully opens a
It doesn't mention the effect of the 2nd parameter to fopen()? If it
came with your compiler, complain to the vendor, otherwise throw it
away and get a proper manual. For any decent manual will tell you
about that parameter and thus explain where the position indicator is
set to when you open the file.
What I can remember of my manual entry. I may have just forgotten about the
file position indicator.
"...fopen([const?]char* filename, const char* mode)
Opens the file <i>filename</i> in the mode indicated by <i>mode</i>. Mode
list:
<table>
r Opens the file for reading
w Opens the file for writing
.....
</table>
<b>Returns:</b> A pointer to that file.
fclose(FILE* f)..."