Is it possible to access file descriptor from file pointer in c ?
If not then why ? 
I tried using fp->fd but i am getting compilation error:
File has no member named fd
what shall i do ?
Is it possible to access file descriptor from file pointer in c ?
If not then why ? 
I tried using fp->fd but i am getting compilation error:
File has no member named fd
what shall i do ?
Under Linux and other Unices, there is a function fileno in <stdio.h> which should give you that information.  Just be sure that you're compiling with the flags necessary to see this function.