title: Using variable outside of for loop.
body: <p>If I have this loop: </p>
  
  <pre><code>int i = 0;
  int bestscore = moveArray[2][0];
  for (; i &lt; count; i++) {
      if (moveArray[2][i] &gt; moveArray[2][0])
          bestscore = moveArray[2][i];
  }
  
  printf("\nComputer places %c at %c%c.\n", color, (moveArray[0][i]) + 'a', (moveArray[1][i]) + 'a');
  </code></pre>
  
  <p>I want to use the i value outside the loop, so this is what I did, but I believe there's a better way to do this by making a copy of the value or something like it?</p>