Check out example codes for "fopen c". It will help you in understanding the concepts better.

Code Example 1

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

Code Example 2

FILE *fopen(const char *filename, const char *mode)

Learn ReactJs, React Native from akashmittal.com