.
Printable View
.
fopen is the standard C function that returns a FILE *, open is system dependent and typically takes some form of file descriptor. So you should use fopen if you plan on using functions that require a FILE *.
-Prelude
>Functions taking FILE* arguments are not an argument for preferring fopen( ) over open( ), because the POSIX core APIs
>require support for fdopen( ), which associates a FILE object with a file descriptor.
I'll rephrase then: If you want to program as portably as possible, then fopen should be preferred as it is an ISO C standard function while open is not. ;)
-Prelude