title: Returning pointer from a function
body: <p>I am trying to return pointer from a function. But I am getting segmentation fault. Someone please tell what is wrong with the code</p>
  
  <pre><code>#include&lt;stdio.h&gt;
  int *fun();
  main()
  {
      int *ptr;
      ptr=fun();
      printf("%d",*ptr);
  
  }
  int *fun()
  {
      int *point;
      *point=12;  
      return point;
  }   
  </code></pre>