Possible Duplicate:
Why i am not getting the expected output in the following c programme?
i am having a doubt in order of evaluation of macros.like for the following code i am not able to understand the ouput:
#include <stdio.h>
#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;
}
Output
12
f(1,2)
why not f is getting expanded first before g in the second printf ?