Can someone tell me why the first example in C gives a Segmentation fault (core dumped) and the second does not?
Why do I get a segmentation fault when writing to a "char *s" initialized with a string literal, but not "char s[]"?