title: What do I get if I declare an array without a size in global scope?
body: <p>In <a href="https://codegolf.stackexchange.com/a/5163/38214">one of the answers</a> in <a href="https://codegolf.stackexchange.com/q/2203/38214">Tips for golfing in C</a>, I saw this code (ungolfed version):</p>
  
  <pre><code>s[],t;
  
  main(c){
      for(scanf("%*d "); ~(c=getchar()); s[t++]=c)
          putchar(s[t]);
  }
  </code></pre>
  
  <p>I think that the above program exhibits UB (but who cares in code golf?). But the thing that I don't understand is the <code>s[]</code> in global scope. I know that when the type of a global variable isn't specified, it defaults to <code>int</code>. I created a small program which surprisingly compiles:</p>
  
  <pre><code>#include &lt;stdio.h&gt;
  
  int s[];
  int main(void)
  {
      printf("Hello!");
  }
  </code></pre>
  
  <p>though it emits one warning:
  </p>
  
  <pre class="lang-none prettyprint-override"><code>prog.c:23:5: warning: array 's' assumed to have one element [enabled by default]
   int s[];
       ^
  </code></pre>
  
  <ul>
  <li>What is <code>s</code> in the above program? Is it an <code>int*</code> or something else?</li>
  <li>Will this be useful anywhere?</li>
  </ul>