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

Code Example 1

#include<stdio.h>
int main(){
	FILE *out=fopen("name_of_file.txt","w");
	fputs("Hello File",out);
	fclose(out);
	return 0;
}

Learn ReactJs, React Native from akashmittal.com