title: Array sizes error in C
body: <p>I wrote a program to do these tasks : First get a string from user and calculate the size of it with sizeof() function. Here is my code : </p>
  
  <pre><code>#include &lt;stdio.h&gt;
  int main()
  {
      char U1[];
      puts("Enter a string:");
      scanf("%s", U1);
      printf("The %s has %i bytes.", U1, sizeof(U1));
      return 0;
  }
  </code></pre>
  
  <p>The compilation error is : <code>error: array size missing in ‘U1’</code>
  Why ? Please explain what is wrong here ?</p>