title: C preprocessor, recursive macros
body: <p>Why does M(0) and N(0) have different results? </p>
  
  <pre><code>#define CAT_I(a, b) a ## b
  #define CAT(a, b) CAT_I(a, b)
  
  #define M_0 CAT(x, y)
  #define M_1 whatever_else
  #define M(a) CAT(M_, a)
  M(0);       //  expands to CAT(x, y)
  
  #define N_0() CAT(x, y)
  #define N_1() whatever_else
  #define N(a) CAT(N_, a)()
  N(0);       //  expands to xy
  </code></pre>