codescracker


c

C fgetpos()



« Previous Function Next Function »


fgetpos

The fgetpos function is used to store the current value of file position indicator in object pointed to by position. The object pointed to bye position must be of the type fpos_t.

fgetpos() Syntax

#include<stdio.h>
int fgetpos(FILE *stream, fpos_t *position);

fgetpos returns non-zero on error, otherwise it returns zero

fgetpos() Example

Following c code stores the current file location in file_loc :

FILE *fp;
fpos_t file_loc;
..
..
..
fgetpos(fp, &file_loc);

« Previous Function Next Function »



Tools
Calculator

Quick Links
Signup - Login - Give Online Test