Possible Duplicate:
What is the difference between char s[] and char *s in C?
I was wondering what is the difference between
char *p1 = "some string";
and
char p2[] = "some string";
in terms of memory, can these not be treated in the same way?
e.g.
void foo(char *p);
…
foo(p1);
foo(p2);
All is explained here: http://c-faq.com/aryptr/aryptr2.html