[Solved] Not Getting Segmentation Fault [duplicate]
First of all, you aren’t guarenteed to get a segmentation fault, or any defined behavior, for triggering undefined behavior, such as modifying a string literal. Though on Linux, string literals are put into read-only memory, so modifying them on Linux will usually result in a segmentation fault. So why doesn’t this code trigger a segfault? … Read more