title: Reading a text file and inserting numbers into array in C
body: <p>I'm starting to learn C by myself. I've been trying to learn as much of the other languages myself also (such as Java, HTML, CSS). Anyways I have a basic question regarding inserting a text file of numbers into an int array.</p>
  
  <p>This is how I'm starting it (let me know if I'm doing anything wrong).</p>
  
  <ol>
  <li><p>I created a text file using the Linux command prompt: <strong>cat > input.txt</strong></p></li>
  <li><p>I entered random numbers of my choosing into input.txt: <strong>14 21 78 14</strong></p></li>
  <li><p>I want to load the numbers from input.txt somehow into my array that I made in my arrayTest.c file.</p></li>
  </ol>
  
  <p>Here is the array that I made:</p>
  
  <pre><code>main() {
  int num[100]; // My array that I want to insert numbers from input.txt into
  }
  
  void readNumbers() { // Function that reads the numbers
  /* Not really sure how to start this -- help would be nice */
  }
  
  void displayNumbers() { // Function that displays the numbers in the output
  printf("Your numbers are:\n", num[1], num[2], num[3], num[4]); // Just an example
  </code></pre>
  
  <p>And then the output would display as so:</p>
  
  <pre><code>Your numbers are: 14 21 78 14
  </code></pre>
  
  <p>I've been looking at tutorials and I just can't seem to get it.</p>