#include <stdio.h>int fgetpos(FILE *stream, fpos_t *position);
For the specified stream, the fgetpos( ) function stores the current value of the file position indicator in the object pointed to by position. The object pointed to by position must be of type fpos_t. The value stored there is useful only in a subsequent call to fsetpos( ).
In C99, both stream and position are qualified by restrict.
If an error occurs, fgetpos( ) returns nonzero; otherwise, it returns zero.
Related functions are fsetpos( ), fseek( ), and ftell( ).