title: I cant understand the error
body: <blockquote>
    <p>i have written this program with a pointer to function but it gives error <code>Lvalue required in function main</code> why?</p>
  </blockquote>
  
  <pre><code>#include&lt;stdio.h&gt;
  fun();
  main()
  {
  int fun();
  int *ptr();
  ptr=fun;   //this line gives error
  *ptr();
  }
  int fun()
  {
      printf("amol singh");
      return 0;
  }
  </code></pre>