The stringize or number-sign operator (#), when used within a macro definition, converts a macro parameter into a string constant. This operator may be used only in a macro that has a specified argument or parameter list.
#define stringer(x) printf (#x "\n")
stringer (text)
printf ("text\n")
printf ("text" "\n")
Because strings separated by whitespace are concatenated at compile time, these two strings are combined into "text\n".
If the string passed as a parameter contains characters that normally should be literalized or escaped (e.g., " and \), the required \ character is automatically added.