C file input/output: Difference between revisions

Content deleted Content added
m +cat
mNo edit summary
Line 5:
 
==Opening a file using <tt>fopen</tt>==
A file is opened using <code>'''fopen'''</code>, which returns an I/O [[stream]] attached to the specified file or other device from which reading and writing can be done. If the function fails, it returns 0a null pointer. Because the functionality is so useful, many languages derived from C provide functions of the same name, with the same or similar function: for example, [[PHP]]. <code>fopen</code> is considered higher-level than the <code>open</code> [[system call]] of UNIX operating systems. The related C library function '''<code>freopen</code>''' performs the same operation after first closing any open stream associated with its parameter.
 
They are defined as