title: Difference between Static variable declared in different scopes
body: <p>What is the difference between declaring static variable inside a block and outside a block in a file? Eg, here, what is difference between static variables a,b,c,d? Can we declare a static variable that is accessible from all files of a program?</p>
  
  <pre><code>    static int a;
      void getVol(..)
      { 
         static int b;
      }
  
      int main()
      {
         static int c;
         while(condition)
         {
             static int d;
              ....
         }
      some code here;
      return 0;
      }
  </code></pre>