Pointer to const string in C

Viewed 17801
char *p = "string"; //creates pointer to constant string

char p[] = "string"; //just an array with "string"

I'm just a bit confused about why does it in the first example create a pointer to a constant string? Shouldn't it be just a pointer refering to a place in memory with "string"?

4 Answers
Related