In article <199b3caa-f6fc-4755-bf49-698a6c4aaa16@m4 5g2000hsb.googl egroups.com>,
magicman <ironsel2000@gm ail.comwrote:
>Is difference lies in the fact that fopen part of c library and
>platform in-depended, whereas open is a system call? what about
>functionalitie s?
>platform in-depended, whereas open is a system call? what about
>functionalitie s?
a system call rather than some other kind library function isn't very
important to users; but it corresponds to the fact that in Unix it's
the basic file opening method. Some other operating systems have a
similar function, but as C comes from the world of Unix you probably
mean that one.
fopen() is the standard C function for opening files. A Unix
implementation will use open() in the implementation of fopen(),
but the stream returned by fopen() provides buffering and works
with functions like printf().
Unless you want to take advantage of system-specific features, stick
with fopen().
-- Richard
--
:wq
Leave a comment: