int fgetpos(int *fileptr, int *pos)
Returns 0 if successful, otherwise non-zero and sets errno to the relevant error value. The file position pointer is stored in the (pos)? parameter.
Gets the current position in the file. You can use the position pointer retrieved by this function in future calls to fsetpos.