title: Is it good programming practice in C to use first array element as array length?
body: <p>Because in C the array length has to be stated when the array is defined, would it be acceptable practice to use the first element as the length, e.g.</p>
  <pre><code>int arr[9]={9,0,1,2,3,4,5,6,7};
  </code></pre>
  <p>Then use a function such as this to process the array:</p>
  <pre><code>int printarr(int *ARR) {
      for (int i=1; i&lt;ARR[0]; i++) {
          printf(&quot;%d &quot;, ARR[i]);
      }
  } 
  </code></pre>
  <p>I can see no problem with this but would prefer to check with experienced C programmers first. I would be the only one using the code.</p>