Skip to content

Glossary: C Basics

fopen and fclose

Also written: fopen, fclose

fopen opens a file in mode "r", "w" or "a" and returns a FILE *, or NULL if it fails. fclose closes it and makes sure everything written reaches the disk.

Where the book teaches it

Related terms

FILE *File modesfprintf and fputs