Moving Around Within Binary Files
One of the benefits of working with binary files is that it's very easy to move around within the binary data. When you open a file, C creates a marker pinpointing a location within this file. (This marker is commonly called a pointer but we don't want to confuse you since it's not the same kind of pointer you've been working with.) When you read from a file, the data is read and the marker is moved forward. When you write, the data is added at that location and, again, the marker is moved forward.
You can also move the marker directly to a specific point using fseek():
fseek(fp, offset, starting_point);
The first argument is our file pointer, which refers to an opened binary file. The second argument dictates ...