title: Declaration or Definition in C
body: <p>From <a href="http://en.wikipedia.org/wiki/External_variable" rel="nofollow noreferrer">External Variables Wiki</a>:</p>
  
  <blockquote>
    <p>If neither the extern keyword nor an
    initialization value are present, the
    statement can be either a declaration
    or a definition. It is up to the
    compiler to analyse the modules of the
    program and decide.</p>
  </blockquote>
  
  <p>I was not able to fully grasp the meaning of this statement with respect to C. For example, does it imply that:</p>
  
  <pre><code>int i;
  </code></pre>
  
  <p>is not necessarily a declaration (as I have been assuming until now), but could be a definition as well (by definition of Definition &amp; Declaration on the same webpage, no puns intended)?</p>
  
  <p>In a nutshell, is the above statement:
  a. just a declaration, or
  b. declaration +  definition?</p>
  
  <p>Reference: <a href="https://stackoverflow.com/q/4012724/191776">Variable declaration and definition</a></p>
  
  <p><strong>Summary of answers received:</strong></p>
  
  <blockquote>
  <pre><code>                         Declaration    Definition    Tentative Definition   Initialized 
  int i;   (inside a block)    Yes           Yes                No                No
  int i=5; (inside a block)    Yes           Yes                No               Yes(to 5)
  int i;   (otherwise)         Yes            No               Yes               Yes(to 0)
  extern int i;                Yes            No                No                No
  
  
  All definitions are declarations but not vice-versa.
  </code></pre>
  </blockquote>