int main() { char *x = \"HelloWorld\"; char y[] = \"HelloWorld\"; x[0] = \'Z\'; //y[0] = \'M\'; return 0; }
function("MyString");
is similar to
char *s = "MyString"; function(s);
"MyString" is in both cases a string literal and in both cases the string is unmodifiable.
"MyString"
passes the address of a string literal to function as an argument.
function