I'm reading source code of the linux tool badblocks. They use the read() function there. Is there a difference to the standard C fread() function? (I'm not counting the arguments as a difference.)
read()
fread()
read() is a low level, unbuffered read. It makes a direct system call on UNIX.
fread() is part of the C library, and provides buffered reads. It is usually implemented by calling read() in order to fill its buffer.
1.4m articles
1.4m replys
5 comments
56.9k users