title: Clarification on function pointers in C
body: <p>The following code comes from example <a href="http://community.corest.com/~gera/InsecureProgramming/abo3.html" rel="nofollow noreferrer">abo3.c</a> from <a href="http://community.corest.com/~gera/InsecureProgramming" rel="nofollow noreferrer">Insecure Programming</a> — see also <a href="https://stackoverflow.com/questions/5051974">Why cast <code>extern puts</code> to a function pointer <code>(void(*)(char*))&amp;puts</code>?</a>:</p>
  
  <pre><code>int main(int argv,char **argc) {
      extern system,puts; 
      void (*fn)(char*)=(void(*)(char*))&amp;system; // &lt;==
      char buf[256];
      fn=(void(*)(char*))&amp;puts;
      strcpy(buf,argc[1]);
      fn(argc[2]);
      exit(1);
  }
  </code></pre>
  
  <p>Specifically this line:</p>
  
  <pre><code>void (*fn)(char*)=(void(*)(char*))&amp;system;
  </code></pre>
  
  <p>I think that <code>void (*fn)(char*)</code> sounds like a lambda, but I know that it's not.
  Then, maybe this is only a play with parentheses, where <code>void *fn(char*)</code> is a declaration of a function and this function is referencing <code>system</code>? But why does the <code>(char*</code>) parameter have no name? Is this permitted?</p>