Support on string in C
Support on `string` in C is quite primitive and sometimes confusing. i'm trying to clarify a little bit by giving the cases below, but can be wrong. Would you mind correcting mines and sharing yours?

i need still ask: Where **local mutable** `string` is stored, then by which mechanism?

    1 char *p = "abc"; /* undefined but implemented as immutable string */
    2 *p = 'A'; /* segementation fault */    
    3 const char *p = "abc"; /* runtime safe */    
    4 char *p2 = "abc"; /* p2 == p?: true */    
    5 char a[] = "abc"; /* mutable string */ /* a == p?: false */    
    6 a[0] = 'A'; /* ok */    
    7 char a2[] = "abc"; /* a2 == a?: true */    
    8 char a3[] = {'a', 'b', 'c', '\0'}; /* a3 == a?: false */

    9 struct S {char a4[4];};
    10 struct S s = {"abc"}; /* s is referenced to the storage of "abc" */
    11 struct S s2 = s; /* s2 is referenced to the same */ /* s2.a4 == s.a4?: true */
    12 struct S s3 = {{'a', 'b', 'c', '\0'}} /* s3 is initialized with them */ /* &s3 == s3.a4?: true */
    13 struct S s4 = s3; /* s4 is copied from s3 */ /* s4.a4 = s3.a4?: false */

    14 /* whether immutable determined on declaring struct when initialize with string literal */
    
    15 struct S_IMMUTABLE {char *p;};
    16 struct S_IMMUTABLE s = {"abc"};
    
    17 struct S_MUTABLE {char a[4];};
    18 struct S_MUTABLE s2 = {"abc"};
    
    19 /* Whether immutable determined on actual parameter instead of formal one */
    
    20 void pass_immutable_string(char *);
    21 void pass_immutable_string(char []);
    22 pass_immutable_string(p);
    23 pass_immutable_string("i'm immutable");
    
    24 void pass_mutable_string(char *);
    25 void pass_mutable_string(char []);
    26 pass_mutable_string(a);





Support on string in C
===

Support on `string` in C is quite primitive and sometimes confusing. i'm trying to clarify a little bit by giving the cases below, but can be wrong. Would you mind correcting mines and sharing yours?

i need still ask: Where **local mutable** `string` is stored, then by which mechanism?

    1 char *p = "abc"; /* undefined but implemented as immutable string */
    2 *p = 'A'; /* segementation fault */    
    3 const char *p = "abc"; /* runtime safe */    
    4 char *p2 = "abc"; /* p2 == p?: true */    
    5 char a[] = "abc"; /* mutable string */ /* a == p?: false */    
    6 a[0] = 'A'; /* ok */    
    7 char a2[] = "abc"; /* a2 == a?: true */    
    8 char a3[] = {'a', 'b', 'c', '\0'}; /* a3 == a?: false */

    9 struct S {char a4[4];};
    10 struct S s = {"abc"}; /* s is referenced to the storage of "abc" */
    11 struct S s2 = s; /* s2 is referenced to the same */ /* s2.a4 == s.a4?: true */
    12 struct S s3 = {{'a', 'b', 'c', '\0'}} /* s3 is initialized with them */ /* &s3 == s3.a4?: true */
    13 struct S s4 = s3; /* s4 is copied from s3 */ /* s4.a4 = s3.a4?: false */

    14 /* whether immutable determined on declaring struct when initialize with string literal */
    
    15 struct S_IMMUTABLE {char *p;};
    16 struct S_IMMUTABLE s = {"abc"};
    
    17 struct S_MUTABLE {char a[4];};
    18 struct S_MUTABLE s2 = {"abc"};
    
    19 /* Whether immutable determined on actual parameter instead of formal one */
    
    20 void pass_immutable_string(char *);
    21 void pass_immutable_string(char []);
    22 pass_immutable_string(p);
    23 pass_immutable_string("i'm immutable");
    
    24 void pass_mutable_string(char *);
    25 void pass_mutable_string(char []);
    26 pass_mutable_string(a);




