Close a stream: how to use fclose : File Close « File « C / ANSI-C






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;
}

           
       








Related examples in the same category