#include <stdio.h>
#define NAME Vitalik
int main(void){
printf("HELLO, NAME");
return 0;
}
#define разве не везде делает замену?Внутри строк не делает.
#define NAME "Vitalik"
...
printf("HELLO, "NAME);
printf("HELLO, ""Vitalik");
и компилятор автоматически объединит эти строки в одну.There is no way to combine an argument with surrounding text and stringize it all together. Instead, you can write a series of adjacent string constants and stringized arguments. The preprocessor replaces the stringized arguments with string constants. The C compiler then combines all the adjacent string constants into one long string.https://gcc.gnu.org/onlinedocs/cpp/Stringizing.htm...