title: Is there any disadvantage to declare a variable global?
body: <p>In C++ language is there any disadvantage to declare a variable global? </p>
  
  <pre><code>void foo()
  {
    int a;
    a=10;
  }
  
  int a;
  void foo()
  {
    a=10;
  }
  </code></pre>
  
  <p>Any differences between them?</p>