What is difference between file descriptor and file pointer? [duplicate]
问题 This question already has answers here : Closed 8 years ago . Possible Duplicate: What's the difference between a file descriptor and file pointer? If I open file like this: FILE *fp = fopen("mr32.txr","r"); then fp is file pointer or file descriptor? What is difference between them? 回答1: fp is a FILE pointer File pointer: It is high level interface Passed to fread() and fwrite() functions Includes buffering,error indication and EOF detection,etc. Provides higher portability and efficiency.