Open file.
Opens the file whose name is specified in the parameter filename and associates it with a stream that can be identified in future operations by the FILE pointer returned. The returned stream is fully buffered by default.
- Parameters
-
filename | C string containing the name of the file to be opened. |
mode | C string containing a file access mode (r, w, a, r+, w+, a+). |
- Returns
- If the file is successfully opened, the function returns a pointer to a FILE object that can be used to identify the stream on future operations. Otherwise, a null pointer is returned.