Possible Duplicate:
C fopen vs open
What is the difference between open() and fopen() in C language?
One is part of the standard c library (fopen
) so you can expect it to be present on all hosted c compiler setups. This function returns a FILE*
which can be operated on by the functions in <stdio.h>
.
The other (open
) is a system call/function not specified by the c standard (however, i believe it is part of the POSIX standard) and therefore only guaranteed to exist on select platforms which claim to support it. This returns an int
which represents a file, this can be operated on using read
/write
and other similar functions.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With