Returns the file descriptor associated with the specified file
pointer.
Format
#include <stdio.h>
int fileno (FILE *file_ptr);
1 – Argument
file_ptr
A file pointer.
2 – Description
If you are using version 5.2 or lower of the C compiler, undefine
the fileno macro:
#if defined(fileno)
#undef fileno
#endif
3 – Return Values
x Integer file descriptor.
-1 Indicates an error.