Reposition stream's pointer indicator: how to use fseek
#include <stdio.h>
int main ()
{
FILE *file;
file = fopen ("my.txt","w");
fputs ("This is a line.", file);
fseek (file, 19, SEEK_SET);
fputs ("Hiiiiiiiiiiiii", file);
fclose (file);
return 0;
}
Related examples in the same category