title: C Function Pointer Differences
body: <p>I have the following C Code:</p>
  
  <pre><code>#include &lt;stdio.h&gt;
  
  int max(int x, int y, int (*compare)(int, int))
  {
    return (*compare)(x,y) ? x : y;
  }
  
  int greater_than(int x, int y)
  {
    if(x &gt; y) return 1;
    else return 0;
  }
  
  int main(void) {
   printf("%d",max(6,7,greater_than));
  }
  </code></pre>
  
  <p>It's just there to test function pointers. But the code still works the same even if i dont use <code>int (*compare)(int,int)</code> but <code>int compare(int,int)</code>. It also works if I don't dereference the function pointer or if use <code>int compare(int,int)</code> but still dereference. It also doesn't make a difference if I pass <code>greater_than</code> or <code>&amp;greater_than</code>. Why is this?</p>
  
  <p>With regards
  Nova</p>