Hi dear fellow,   I am having a problem running the enclosed test program. I expected program to pass the test points 1, 2 and 3 but instead it cored at point 2 (3). After looking into generated assembler code I noticed that string literals casted to array initializers (see pointers S2 and s3) were put into read only segment. Is this correct (i.e. in compilance with ANSI C standard ) ? I am running gcc version 2.95.2 19991024 on SCO UNIX.     Thanks for your help,   Zeljko Oluic   Enc. strings test program   #include     char S1[] = "can be modified"; char *S2 = (char []) {"can be modified too"};     void string_constant(void) {     char *s1;     char *s2;     char *s3;         s1 = "if modified possible run-time error";     s2 = "if modified possible run-time error";     s3 = (char []) {"can be modified too"};         if (s1 == s2) printf("shared strings\n");     else printf("strings are not shared\n");       printf("the following need to be ok\n");     printf("1\n");     S1[0] = 'x';     printf("2\n");     S2[0] = 'x';     printf("3\n");     s3[0] = 'x';       printf("the following can cause a run-time error\n");     s1[0] = 'x';       if (*s1 == 'x')  printf("strings are writable\n");     else printf("strings are not writable\n"); }