Char []和 char * 之间有什么区别?

In C, one can use a string literal in a declaration like this:

char s[] = "hello";

or like this:

char *s = "hello";

So what is the difference? I want to know what actually happens in terms of storage duration, both at compile and run time.

转载于:https://stackoverflow.com/questions/1704407/what-is-the-difference-between-char-s-and-char-s