I know that:
#define foo 4
#define str(s) #s
with str(foo) writes out: "foo", because stringify is executed first of text expansion, but this:
#define xstr(s) str(s)
#define str(s) #s
#define foo 4
with xstr(foo) writes out: "4".
Why? What are the steps involved in the process?