title: Enumerating over an array in C
body: <p>I'm trying to enumerate over an array in C, much like pythons enumerate method.</p>
  
  <pre><code>static void enumerate(char *choices[])
  {
      int i;
      int length = sizeof(choices)/sizeof(*choices);
  
      for (i = 0; i &lt; length; i++)
      {
          printf("[%d] %s\n", i, choices[i]);
      }
  }
  </code></pre>
  
  <p>How I'd expect this to work is, create an array (or list): <code>char *test[] = {"test", "testing};</code> then pass that array (or list) to the function: <code>enumerate(test);</code> and the expected output should be:</p>
  
  <pre><code>[0] test
  [1] testing
  </code></pre>
  
  <p>However when I try this, the output I'm getting is just the first item in the array:</p>
  
  <pre><code>[0] test 
  </code></pre>
  
  <p>What am I doing wrong to where this will not work as I'd expect it to?</p>