title: C++ Printing Contents of array backwards One incorrect digit
body: <p>As part of a program I'm trying to print the contents of an array in reverse order. It is working fine except for one value and I can't figure out why. </p>
  
  <p>I haven't gotten onto functions yet so I haven't used them in my code here is the snippet</p>
  
  <pre><code>case 7:
      for (int i = 11; i != -1; i--)// The variable i is initialised to 11. While i is not equal to -1 decrement i by 1.
      {
          infile &gt;&gt; list[i];//Read in values for array from data.dat
          cout &lt;&lt; list[i] &lt;&lt; " ";// Outputting the array in reverse order.
          outfile &lt;&lt; "The array in reverse order is: " &lt;&lt; list[i] &lt;&lt; " " &lt;&lt; endl;// Outputting the array in reverse order to file.
  
      }
      cout &lt;&lt; endl;
      break;
  </code></pre>
  
  <p>The array is filled with the following numbers </p>
  
  <blockquote>
    <p>8 16 12 6 16 4 8 10 2 16 12 6</p>
  </blockquote>
  
  <p>The expected output is:</p>
  
  <blockquote>
    <p>6 12 16 2 10 8 4 16 6 12 16 8</p>
  </blockquote>
  
  <p>The output I'm getting is:</p>
  
  <blockquote>
    <p>6 12 16 2 10 8 4 16 6 12 6 8</p>
  </blockquote>
  
  <p>Any help appreciated</p>