Top "Fseek" questions

fseek is a C function belonging to the ANSI C standard library, and included in stdio.

fseek vs rewind?

I have noticed two methods to return to the beginning of a file FILE *fp = fopen("test.bin", "r") fseek(…

c fopen fseek
fseek does not work when file is opened in "a" (append) mode

FILE* f = fopen("rajat", "w"); fputs("sometext", f); fseek(f, 6, SEEK_SET); fputs("is a", f); fclose(f); Successfully returns: "…

c++ c file fseek
fseek now supports large files

It appears that fseek now, at least in my implementation, supports large files naturally without fseek64, lseek or some strange …

c++ 64-bit large-files fseek
behaviour of fseek and SEEK_END

If I have a text file with the following content opened as binary 1234567890 a call like this: fseek(fp, 5L, …

c fseek
fseek on a position beyond EOF does not trigger EOF using feof, how come?

I'm reading data from a file to memory that is opened with: FILE *f = fopen(path, "rb"); Before I start …

c linux io eof fseek
How is fseek() implemented in the filesystem?

This is not a pure programming question, however it impacts the performance of programs using fseek(), hence it is important …

performance architecture filesystems fseek
Can fseek() be used to insert data into the middle of a file? - C

I know that the function fseek() can be used to output data to a specific location in a file. But …

c insert fseek
fseek(f,0,2); How does this work without SEEK_CUR / SEEK_SET or SEEK_END?

I'm not being able to understand it, aren't we supposed to have SEEK_CUR / SEEK_SET or SEEK_END in …

c file fseek