C has no specific string concatenation operator (
+) like C# and Java. In C# or Java, when the compiler sees
"a" + "b"
it can compile the code exactly as if
were written in the source code. In C, however, there is no similarly easy syntax for describing concatenation of strings that the compiler can recognise and pre-calculate. So the designers of C decades ago chose that
would mean exactly the same thing as
Naturally C++ inherited the same convention. While the standard C++ library overloads
std::string to mean string concatenation, the compiler does not attempt to coalesce
"a" + "b" because that is actually an error (you can't add two
const char * pointers together).