[Solved] Can a string literal and a non-string non-compound literal be modified? [duplicate]

From the C Standard (6.4.5 String literals) 7 It is unspecified whether these arrays are distinct provided their elements have the appropriate values. If the program attempts to modify such an array, the behavior is undefined. As for your statement. The second paragraph says that “C does not strictly prohibit modifying string literals” while compilers … Read more