Other answers speak of a look from the standpoint, but that is why it crashes.
Compilers usually put program literals - especially strings - in read-only memory. Memory is read-only by the operating system, so any attempt to write to it falls into the trap, and on your platform this indicates a segmentation error; attempt to perform operation on some memory that is not allowed. Another type of failure associated with misuse of memory is a bus error, which usually indicates either unacceptable memory access or a write to a page that does not appear at all. For C code, the difference is almost entirely academic (some other language implementations use these errors to help them manage memory).
Please note that capturing read-only records is independent of the official language semantics. Although you can point char* to it, you still cannot write it. Always refer to program literals as if they were pointing to read-only memory, and you wonβt be mistaken (that they arenβt the default because of the need to maintain compatibility with older programs).
Donal fellows
source share