How do I save a text file into an array? : <p>This is how I print out the text file</p>

<pre><code>FILE *file;
char array[200];

file = fopen("test.txt", "r");

fread(array,1, 200, file);
printf("\n%s", array);
fclose(file);
</code></pre>

<p>Instead I want to save the text file rows to an array so i can print out the text file with the array.</p>

<p>I can only use those fopen,fprintf,fwrite,fscanf,fread,fseek,fclose. Not fget.</p>

<p>How do i save the text file lines to an array?</p>
