Close a stream: how to use fclose
#include <stdio.h> int main () { FILE *f; f = fopen ("my.txt","wt"); fprintf (f, "fclose example"); fclose (f); return 0; }