title: Arrays-Problem with global integer declaration in C
body: <p>Completely new to programming, currently following along the CS50 course on Youtube, so i don't have access to their CS50 sandbox. I'm currently on lecture 2 about the arrays. According to the professor, the following codes should compile and run just fine, but on the Visual Studio 2019 Community edition on my PC, I have run into error C2057, expected constant expression; and error c2466, cannot allocate an array of constant size 0,  when compiling.</p>
  <p>Please help explain why in CS50 online sandbox, these codes are fine, while in VS 2019 they are not? Are my codes not written correctly, or is it VS2019 not working the same way as CS50 sandbox? I read somewhere VS2019 is not compatible with C99 or something like that, is this related to the issue at hand?</p>
  <p>PS: also read today that VS2019 will support C11 and C17, will this new update help?</p>
  <p>Thanks a lot!</p>
  <p>These are my codes:</p>
  <pre><code>#include &lt;stdio.h&gt;
  
  const int N = 5;
  
  int main(void)
  {
      double scores[N] = { 59, 60, 90, 85, 87 };
      double total_score = 0;
      for (int i = 0; i &lt; N; i++)
      {
          
          total_score += scores[i];
      }
      double average = total_score / N;
      printf(&quot;Average score is : %.1f,&quot;, average);
  }
  </code></pre>