title: Getting erronous output
body: <p>following code gives output 10 on machine and 0 on ideone.
  What can be the reason ?</p>
  
  <pre><code>#include&lt;iostream&gt;
  using namespace std;
  
  int *fun()
  {
      int x = 10;
      return &amp;x;
  }
  
  int main()
  {
      *(fun()) = 30;
      cout &lt;&lt; *(fun());
      return 0;
  }
  </code></pre>