title: Assigning reference to a variable in C++
body: <p>My question is why it is possible to assign reference to a variable that is not declared as reference?</p>
  
  <p>Thank you.</p>
  
  <pre><code>int &amp;testRef(int &amp;x)
  {
      return ++x;
  }
  
  int main()
  {
      int x = 1, y;
      y = testRef(x); // assigning testRef(x) which is int&amp; to y which is int
      return 0;
  }
  </code></pre>