title: How anonymous namespaces avoids making global static variable?
body: <p>We can have anonymous namespaces (namespace with no name). They are directly usable in the same program and are used for declaring unique identifiers. It is said that it avoids making global static variable.My question is if it is not static then why default value is zero? </p>
  
  <p>As these question has been asked before but  it is not  clear at all <a href="https://stackoverflow.com/questions/12609690/c-anonymous-namespace-variables-initialized-to-0">C++ anonymous namespace: Variables initialized to 0?</a></p>
  
  <pre><code>#include&lt;iostream&gt;
  using namespace std;
  
  namespace 
  {
    int x; // Here x should have garbage value according to definition of anonymous namespace
  }
  
  int main()
  {
     cout &lt;&lt; x &lt;&lt; endl;// But x is throwing zero why?
  }
  </code></pre>