title: Function pointer to different functions with different arguments in C
body: <p>I have two functions with variable number and types of arguments</p>
  <pre><code>double my_func_one(double x, double a, double b, double c) { return x + a + b + c }
  double my_func_two(double x, double p[], double c) { return x + p[0] + p[1] + c }
  </code></pre>
  <p>I want to use a pointer to a function to the functions I defined above based on a some condition getting true e.g.</p>
  <pre><code>if (condition_1)
     pfunc = my_func_one;
  else if (condition_2)
     pfunc = my_func_two;
  
   // The function that will use the function I passed to it
   swap_function(a, b, pfunc);
  </code></pre>
  <p>My question is, for this scenario, Can I at all define a function pointer? If yes, how?<br />
  My understanding is that the prototype of function pointer should be the same for all those functions it CAN be pointed to.</p>
  <pre><code>typedef double (*pfunction)(int, int);
  </code></pre>
  <p>In my case they are not the same. Is there any other way to do this?</p>
  <h1>Language</h1>
  <p>I am developing in C and I am using gcc 4.4.3 compiler/linker</p>