H
happy
#include<stdio.h>
#define pstr(x) printf(#x)
int main()
{
pstr("Hello");
printf("\n");
return 0;
}
I thought that pstr("Hello") will expand to printf(""Hello"") which
will give compile error.
But it prints "Hello".
How expansion is working?
#define pstr(x) printf(#x)
int main()
{
pstr("Hello");
printf("\n");
return 0;
}
I thought that pstr("Hello") will expand to printf(""Hello"") which
will give compile error.
But it prints "Hello".
How expansion is working?