Page that contains the very useful Stringification documentation:
If you want to stringify the result of expansion of a macro argument, you have to use two levels of macros.
#define xstr(s) str(s) #define str(s) #s #define foo 4 str (foo)
expands to “foo”
expands to xstr (4)
expands to str (4)
expands to “4”