I have C code that contains strinigication as below.
#define xstr(s) str(s)
#define str(s) #s
#define foo 4
Now xstr (foo) is evaluating as "4" correctly.
But str(foo) is getting evaluated as "foo". But I thought it should be evaluated as "4". Can any one please explain me how it is evaluated as "foo".