I am reading the chapter on arrays and pointers in Kernighan and Richie's The C Programming Language.
They give the example:
/* strlen: return length of string s */
int strlen(char *s)
{
int n;
for (n = 0; *s != '\0'; s++)
n++;
return n;
}
And then say:
“Since s is a pointer, incrementing it is perfectly legal; s++ has no effect on the character string in the function that called strlen, but merely increments strlen’s private copy of the pointer. That means that calls like
strlen("hello, world"); /* string constant */
strlen(array); /* char array[100]; */
strlen(ptr); /* char *ptr; */
all work.”
I feel like I understand all of this except the first call example: Why, or how, is the string literal "hello, world" treated as a char *s? How is this a pointer? Does the function assign this string literal as the value of its local variable *s and then use s as the array name/pointer?

const char* s. This is particularly important when a string literal is passed. Had your function attempted a write to*syou would invoke undefined behavior and the program could crash.By definition, the value of a variable of expression of type array is the address of element zero of the array. So, when I use a string literal as a parameter in a function, I am not passing the string literal itself but the "type array", which is a pointer to the 0th index in the string literal, which is an array.const char *srather thanchar *s) can be found at securecoding.cert.org/confluence/display/seccode/…