Don’t understand, C preprocessor operator

Code:

#include <stdio.h>

#define tokenpaster(n) printf ("token" #n " = %d", token##n)

int main(void)
{
    
    
   int token34 = 40;
   
   tokenpaster(34);
   return 0;
}

Compilation result:
token34 =40

Tag Paste Operator (##) The tag paste operator (##) in the
macro definition combines two parameters. It allows two independent tags to be merged into one tag in the macro definition.
How does this happen, because this example will produce the following actual output from the compiler:

printf ("token34 = %d", token34);
This example demonstrates that token##n will be connected to token34. Here, we use the string constantization operator (#) and the token paste operator (##).

Don't understand
https://www.runoob.com/cprogramming/c-preprocessors.html

Guess you like

Origin blog.csdn.net/weixin_42417585/article/details/105185902