This function returns the size, in bytes, of a file whose handle is
specified in the argument fhandle. To get the handle of a file
opened by fopen (see section fopen) or freopen (see section freopen),
you can use fileno macro (see section fileno).
Return Value
The size of the file in bytes, or (if any error occured) -1L and
errno set to a value describing the cause of the failure. If the
file's length is larger than a 32-bit unsigned int can hold,
errno will be set to EOVERFLOW.
Portability
ANSI/ISO C
No
POSIX
No
Example
printf("Size of file to which STDIN is redirected is %ld\n",
filelength(0));
Please take a moment to fill out
this visitor survey You can help support this site by
visiting the advertisers that sponsor it! (only once each, though)