Doubt:Code:#include "stdio.h" #define a(x,y) x##y #define b(x) #x #define c(x) b(x) int main() { printf("%s\t",c(a(34,56))); printf("%s\n",b(a(34,56))); return 0; } Output: 3456 a(34,56)
According to my understanding c(a(34,56)) should be expanded to c(3456) and then to b(3456) followed by "3456"
and b(a(34,56)) should be expanded to b(3456) followed by "3456". So the output should be:
3456 3456 but this is not so why?
If a statement contains a macro within macro then what would be the order of expansion in macros? Is it that first the inner one would be expanded followed by the outer one or vice versa?