read-only memory
I feel like Sherlock, if he were a developer

I have never heard of this being referred to as “read-only memory” before, from what I remember back in those days, memory is allocated from the stack, or heap, based on whether its statically allocated or dynamically allocated (feel free to come back on that definition, its been like 10 years since I did c/c++ I might be a little shaky on the terminology)

So this is a stack allocated string, is that what you meant by read only? because it’s allocated the number of bytes of memory for the assignment, but then concatenating extra strings onto the end is going to write into non-allocated memory, sort of like a buffer overrun.