title: extern and global in c
body: <p>Can anyone please tell me is there any special requirement to use either <code>EXTERN</code> or <code>GLOBAL</code> variables in a C program?
  I do not see any difference in a program like below, if I change from gloabl to extern.</p>
  
  <pre><code>#include &lt;stdio.h&gt;
  #include &lt;stdlib.h&gt;
  int myGlobalvar = 10;
  
  int main(int argc, char *argv[])
  {
    int myFunc(int);
    int i;
    i = 12;
    myGlobalvar = 100;
    printf("Value of myGlobalvar is %d ,  i = %d\n", myGlobalvar, i);
    i = myFunc(10);
    printf("Value of passed value : %d\n",i);
    printf("again Value of myGlobalvar is %d ,  i = %d\n", myGlobalvar, i);
    system("PAUSE");  
    return 0;
  }
  int myFunc(int i)
  {
      i = 20 + 1000;
  //extern int myGlobalvar;
  myGlobalvar = 20000;
  //    printf("Value of passed value : %d",i);
  return i;
  }
  </code></pre>
  
  <p>If uncomment <code>extern int myGlobalvar</code>, the value does not change.</p>
  
  <p>Is there any <code>correct</code> difference between both?</p>
  
  <p>Can anyone please correct me?</p>