asked 60.6k views
2 votes
How to read from file in C?

asked
User Uri
by
7.8k points

1 Answer

4 votes
Open a file using the function fopen() and store the reference of the file in a FILE pointer.
Read contents of the file using any of these functions fgetc(), fgets(), fscanf(), or fread().
File close the file using the function fclose

No related questions found