Jan 13, 2009

can anyone tell me the difference b/w file pointer and file descriptor and in which situation both of them should be used

can anyone tell me the difference b/w file pointer and file descriptor and in which situation both of them should be used
file descriptor is defined in kernel space, you can use it with system call
open()read()wirte()close(). it will manipulate the system internal directly.
file pointer is define in user space, you can use library function
fopen()fclose()
file pointer is used in c library to open or close the file, while file descriptor is file pointer in unix including stdout, stdin, stderr

No comments:

Post a Comment