title: how to tokenize string to array of int in c?
body: <p>Anyone got anything about reading a sequential number from text file per line and parsing it to an array in C?</p>
  
  <p>What I have in a file:</p>
  
  <pre><code>12 3 45 6 7 8
  3 5 6 7
  7 0 -1 4 5
  </code></pre>
  
  <p>What I want in my program:</p>
  
  <pre><code>array1[] = {12, 3, 45, 6, 7, 8};
  array2[] = {3, 5, 6, 7};
  array3[] = {7, 0, -1, 4, 5};
  </code></pre>
  
  <p>I've been through several ways to read it, but the only matter is only when i want to tokenize it per line.
  Thank you.</p>