Use macro to build string
#include <stdio.h> #define MKSTRING(str) # str int main(void) { int value; value = 10; printf("%s is %d", MKSTRING(value), value); return 0; }