title: can anyone explain the output?
body: <p>Can anyone explain the output?    </p>
  
  <pre><code>#include&lt;iostream&gt;
  
  using namespace std;  
  
  int &amp;fun(){   
    static int x = 10;   
    return x;   
  } 
  
  int main(){         
    fun() = 30;
    cout &lt;&lt; fun();          
    return 0;         
  }
  </code></pre>
  
  <p>output is 30</p>