Other useful functions in <stdio.h> to work with files:
fgets() Reads a full string from a file.
fputs() Writes a full string to a file.
fprintf() Writes a formatted string to a file.
fseek() Allows you rewind or fast-forward within a file. So will move the file pointer to a certain byte position in the file, like go to byte 100, or byte 1000, etc.
ftell() Tells you at what (byte) position you are at within a file.
feof() Tells you whether you've read to the end of the file.
ferror() Indicates whether an error has occurred in working with a file.
fseek(inptr, offset, from);
inptr: which FILE * we are working with
offset: how many bytes to move
from: which position in the file we start moving from
SEEK_CUR (current position in file)
SEEK_SET (beginning of file)
SEEK_END (end of file)