title: Declaring an array of unknown size
body: <p>This is not specific to any programming language, the problem is "find the index of a specified value in an array of n numbers.</p>
  
  <p>Now my question is, in the code below can you declare an array how I have done it.</p>
  
  <pre><code>{int n;
  read(n);
  int array[n];
  </code></pre>
  
  <p>......</p>
  
  <p>or is this allowed?</p>
  
  <pre><code>{int n; array[n];
  read(n)
  </code></pre>
  
  <p>I'm thinking the first one is correct.</p>
  
  <p>Thanks in advance.</p>