title: how to call particular function using #define macro?
body: <p>I want to call a particular function according to the value i passed to the macro. But it is giving me compilation error</p>
  
  <pre><code>#include &lt;stdio.h&gt;
  
  #define calling(m, j) execcall ## m(j);
  
  void execcall0 (int x) {
      printf("called 0 with arg %d\n", x);
  }
  
  void execcall1 (int x) {
      printf("called 1 with arg %d\n", x);
  }
  
  void execcall2 (int x) {
      printf("called 2 with arg %d\n", x);
  }
  
  int main () {
      int i = 0;
      for (i = 0; i &lt; 3; i++) {
          calling(i, 1);
      }
  }
  </code></pre>
  
  <p>Compilation error:</p>
  
  <pre><code>In function `main':
  new.c:(.text+0x7a): undefined reference to `execcalli'
  collect2: ld returned 1 exit status
  </code></pre>
  
  <p>Is it even possible whatever i am trying?</p>