martes, 24 de mayo de 2022

C file creation easy - C library function - fopen()

 

https://www.tutorialspoint.com/c_standard_library/c_function_fopen.htm



#include <stdio.h>
#include <stdlib.h>

int main () {
   FILE * fp;

   fp = fopen ("file.txt", "w+");
   fprintf(fp, "%s %s %s %d", "We", "are", "in", 2012);
   
   fclose(fp);
   
   return(0);
}

No hay comentarios:

Publicar un comentario