title: function pointers within a struct but with functions of different prototype in C
body: <p>Suppose I have functions:</p>
  
  <pre><code>void func1(int x)
  {
      ....
  }
  
  void func2(int x, int y)
  {
      ....
  }
  
  void func3(int x, int y, int z)
  {
      ....
  }
  </code></pre>
  
  <p>And say that I want to have a function pointer within a struct:</p>
  
  <p>For example</p>
  
  <pre><code>typedef struct{
       char *ename;
       char **pname;
      &lt; and here I want to have a function pointer&gt; ??
  } Example;
  
  Example ex[3];
  </code></pre>
  
  <p>Now, I want to populate the ex[3] array as:</p>
  
  <pre><code>ex[0].ename = "X0";
  ex[0].pname[0]="A0";
  ex[0].pname[1]="B0";
  ex[0].&lt;function pointer to func1() &gt; ??
  
  
  ex[1].ename = "X1";
  ex[1].pname[0]="A1";
  ex[1].pname[1]="B1";
  ex[1].&lt;function pointer to func2() &gt; ??
  </code></pre>
  
  <p>... and so on...</p>
  
  <p>Is it  possible to create something like this? Please help me with this. Thanks.</p>