[Solved] Strange problem with variable in C program [closed]
The array str, because it doesn’t have an explicit size, is sized to exactly store what it is initialized with. And because an empty string only contains 1 character, namely a terminating null byte, your array is 1 element in size. This means str isn’t large enough to hold any string that’s not an empty … Read more