title: Use of 'extern' Keyword
body: <p>i am confused in the use of extern keyword in C. when it is used with a variable, then it means the declaration of variable. I declare the variable tmp outside the main() function and define it in a separate block in main but when i print the value in subsequent block i got an error "UNRESOLVED EXTERNAL LINK". I am confused please give me detailed explanation. </p>
  
  <hr>
  
  <pre><code>#include &lt;stdio.h&gt;
  extern int tmp ;
  int main()
  {
      {
          int tmp = 50;
      }
      {
          printf("%d",tmp);
      }
      return 0;
  }
  </code></pre>
  
  <hr>