************c macro Stringizing operator (#)
This operator causes the corresponding actual argument to be
enclosed in double quotation marks.
//对应的对应参数为到双引号括起来
#include
#define mkstr(s) #s
int main(void)
{
printf(mkstr(geeksforgeeks));
return 0;
}
***Token-pasting operator (##)
Allows tokens used as actual arguments to be concatenated to form other tokens
作为真正参数的标记可以连接为其他标记
This is called token pasting or token concatenation. The ‘##’ pre-processing operator performs token pasting.
//执行标记粘贴
When a macro is expanded, the two tokens on either side of each ‘##’ operator are combined into a single token,
//展开宏时,##两边的token合成为一个
which then replaces the ‘##’ and the two original tokens in the macro expansion
#include
#define concat(a, b) a##b
int main(void)
{
int xy = 30;
printf("%d", concat(x, y));
return 0;
}
This operator causes the corresponding actual argument to be enclosed in double quotation marks.
The # operator, which is generally called the stringize operator, turns the argument it precedes into
a quoted string.
#include
#define mkstr(s) #s
int main(void)
{
printf(mkstr(geeksforgeeks));
return 0;
}
Allows tokens used as actual arguments to be concatenated to form other tokens. It is often useful to merge
two tokens into one while expanding macros. This is called token pasting or token concatenation. The ‘##’
pre-processing operator performs token pasting. When a macro is expanded, the two tokens on either side of
each ‘##’ operator are combined into a single token, which then replaces the ‘##’ and the two original tokens in the macro expansion.
#include
#define concat(a, b) a##b
int main(void)
{
int xy = 30;
printf("%d", concat(x, y));
return 0;
}



