what is the difference between the fopen and open functions?
Printable View
what is the difference between the fopen and open functions?
>what is the difference between the fopen and open functions?
A world.
No, seriously. But the cosmetic differences can be gleaned by looking at the prototypes of each function. The most immediate difference is that fopen returns a FILE * while open returns an int.
Also, open() is defined by POSIX and fopen() is ISO-standard C (89/99).
In some *nix flavors, open() is the interface to the OS. In those systems, fopen() would be implemented by making calls to open().
gg