title: Why i am not getting the expected output in the following c programme?
body: <blockquote>
    <p><strong>Possible Duplicate:</strong><br>
    <a href="https://stackoverflow.com/questions/3534070/what-does-define-stra-a-do">What does &ldquo;#define STR(a) #a&rdquo; do?</a><br>
    <a href="https://stackoverflow.com/questions/3776750/macros-evaluation-in-c-programming-language">Macros evaluation in c programming language</a>  </p>
  </blockquote>
  
  
  
  <pre><code>#include &lt;stdio.h&gt;
  #define f(a,b) a##b
  #define g(a)   #a
  #define h(a) g(a)
  
  int main()
  {
        printf("%s\n",h(f(1,2)));
        printf("%s\n",g(f(1,2)));
        return 0;
   }
  </code></pre>
  
  <p>I was expecting the output to be same for both the printf. But what I am getting is different(given below)</p>
  
  <pre><code>12
  f(1,2)
  </code></pre>
  
  <p>can someone explain what is the reason and why is it happening in detail?</p>