Skip to main content

  | मौसम…

411 समाचार
Public archive edition · Attributed source reporting with original dates · AI drafts are excluded

411 REFERENCE · Wikibooks

C programming/stdio.h/fgetpos

Reference material by Wikibooks contributors. This retains its source identity and is not 411 news reporting.

fgetpos is a function in the I/O section of the C standard library. Usage int fgetpos(FILE *stream, fpos_t *pos); fgetpos() will retrieve the file offset (in bytes) from stdio stream stream into storage of type fpos t pointed to by variable pos, which should be allocated by the caller. This variable should only be used for subsequent calls to fsetpos(). A separate function, ftell() can be used instead in order to retrieve the value of the file offset as a long integer. The return value is 0 on successful completion, or -1 on error (in which case errno is set accordingly). deep