In the C Programming Language, the fopen characteristic opens a file known as filename and associates it to stream. The fopen characteristic clears all error and EOF indictors for the stream.
The syntax for the fopen characteristic in the C Language is:
FILE *fopen(const char *filename, const char *mode);
Parameters or Arguments
filename The filename to companion with the new file being opened. mode The mode in which to open the file.
The fopen function returns a file pointer for the new file. If a new file can not be opened, the fopen feature returns a null pointer.
In the C Language, the required header for the fopen feature is:
In the C Language, the fopen function can be used in the following versions:
Other C functions that are similar to the fopen function:
freopen function <stdio.h>
Other C functions that are noteworthy when dealing with the fopen function:
fclose characteristic setbuf characteristic setvbuf characteristic