open/read/write are low-level I/O functions, and if speed is of my first concern, how to choose between open/read/write and fopen/fread/fwrite?
open/read/write are low-level I/O functions, and if speed is of my first concern, how
Share
Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.
Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.
Lost your password? Please enter your email address. You will receive a link and will create a new password via email.
Please briefly explain why you feel this question should be reported.
Please briefly explain why you feel this answer should be reported.
Please briefly explain why you feel this user should be reported.
The higher level functions provide you with ease of usage also, functions like
fopen()provides you with in-built I/O buffering unlikeopen(). The I/O buffering ensuresfopen()is much faster thanopen().Apart from the above distinction If you have just file descriptor, you should use read, write etc, While If you have a
FILE *, you should use functions likefread,fwriteetc.