String Operator #
This page was translated by a robot.
Prefixing a macro parameter with a single in a parameterized macro definition #means that the macro parameter is not simply replaced with the passed argument, but that the passed code " "is interpreted as a string in double quotes, which is why this operator is also affectionately known as a stringifier or in English called a stringizer .
i: 5 i+1: 6
#include <stdio.h>
#define MESSAGE(x) printf("%s: %d\n", #x, x)
int main(){
int i = 5;
MESSAGE(i);
MESSAGE(i+1);
return 0;
}