title: Reading words in line and putting them in array
body: <p>I need my program to read a line of a file, and then parse the line and insert any words into an index of each array. The only problem is that I don't know how many words there are per line, it can be 1-6 words per line.</p>
  <p>So this is what a simple file can look like:</p>
  <blockquote>
  <p>apple oranges</p>
  <p>computer terminal keyboard mouse</p>
  </blockquote>
  <p>I would need a char array to hold the words apple and oranges if I am scanning line 1.
  Example:</p>
  <pre><code>words[0][0] = &quot;apple&quot;;
  words[1][0] = &quot;oranges&quot;;
  </code></pre>
  <p>So far, I have something like this, but how can I make it so it works with fewer than 6 words per line?</p>
  <pre><code>fscanf(file, &quot;%19[^ ] %19[^ ] %19[^ ] %19[^ ] %19[^ ] %19[^ ]&quot;, string1, string2, string3, string4, string5, string6);
  </code></pre>