title: Declaring typedef to a function
body: <p>How does the following code works without giving a name for the typedef in the 3rd line?How compiler assumes pf as a new data type?</p>
  
  <pre><code>#include &lt;stdio.h&gt;
  
  int fun(int, int);
  typedef int (*pf) (int, int);
  int proc(pf, int, int);
  
  int main(){
      printf("%d\n", proc(fun, 6, 6));
      return 0;
  }
  
  int fun(int a, int b){
      return (a==b);
  }
  
  int proc(pf p, int a, int b){
      return ((*p)(a, b));
  }
  </code></pre>