Check out example codes for "how to print a file c". It will help you in understanding the concepts better.
Code Example 1
c = fgetc(fptr);
while (c != EOF)
{
printf ("%c", c);
c = fgetc(fptr);
}
Learn ReactJs, React Native from akashmittal.com