title: what does &fun() refer to in the program?
body: <p>This is an example problem to demonstrate the use of references in c++. i'm a beginner and this is my first time learning about references. i don't understand why we use <code>&amp;fun()</code>. what does it mean?</p>
  <pre><code>#include&lt;iostream&gt;
  using namespace std;
  
      int &amp;fun(){
          static int x = 10;
          return x;
      }
      
      int main(){
          int &amp;y=fun();
          y = 20;
          cout&lt;&lt;fun();
      }
  </code></pre>
  <p>output : 20</p>