From 7e0f021a9aec35fd8e6725e87e3313b101d26f5e Mon Sep 17 00:00:00 2001 From: Tobias Klauser Date: Sun, 27 Jan 2008 11:37:44 +0100 Subject: Initial import (2.0.2-6) --- reference/C/FUNCTIONS/fopen.html | 108 +++++++++++++++++++++++++++++++++++++++ 1 file changed, 108 insertions(+) create mode 100644 reference/C/FUNCTIONS/fopen.html (limited to 'reference/C/FUNCTIONS/fopen.html') diff --git a/reference/C/FUNCTIONS/fopen.html b/reference/C/FUNCTIONS/fopen.html new file mode 100644 index 0000000..e85afbc --- /dev/null +++ b/reference/C/FUNCTIONS/fopen.html @@ -0,0 +1,108 @@ +fopen function + + + + +
+
+

fopen function

+
+
+

+fopen is used to open a file for read, write or update. +stdin, stdout & stderr are opened +by the system at execution time. +

+ + + + + +
+
+
+Library:   stdio.h
+
+Prototype: FILE *fopen(const char *filename, const char *mode);
+
+Syntax:    FILE *fp;
+	   fp = fopen( "/etc/printcap", "r");
+
+
+
+ +

Notes:

+
+	filename - is the name of the file.
+	mode     - r - read file.
+                 - w - Write to file.
+                 - a - Append to file.
+
+
+ +
+

Example Programs:

+ + + Example program.

+


+

See Also:

+
+
+
fgetc Get a character from a file. + +
+
fgets Get a record from a file. + +
+
fputc Put a character into a file. MAN PAGE. + +
+
fprintf Put a formatted line into a file. + +
+
fclose Close a file. + +
+
pclose Close a pipe. + +
+
system Open a pipe. + +
+
ferror. +Check error code on a file stream. + +
+
feof. +Check for EOF on a file stream. +
+ + +

+ +


+

+

+ + + + +
+ Top + + Master Index + + Keywords + + Functions +
+
+

+


+
Martin Leslie +

+ + + -- cgit v1.2.3-54-g00ecf