Q. Which function is used to open a file in C?
β
Correct Answer: (B)
fopen()
Explanation: In C programming language, the fopen() function is used to open a file.
Syntax:
ptr = fopen("fileopen","mode");
Where, fileopen is the name of the file, and mode is the mode of the file.
Syntax:
ptr = fopen("fileopen","mode");
Where, fileopen is the name of the file, and mode is the mode of the file.