C file input/output: Difference between revisions

Content deleted Content added
BL~enwiki (talk | contribs)
No edit summary
BL~enwiki (talk | contribs)
No edit summary
Line 28:
A conventient way to find the length of a file in C is:
 
<code>
FILE *f = fopen("filename", "rb");
[[fseek]](f, 0, SEEK_END);
length = [[tell]](f);
[[rewind]](f);
</code>