Why are compound literals in C modifiable
A compound literal is an lvalue and values of its elements are modifiable. In case of char* str = (char[]){“Hello World”}; *str=”B”; // A-Okay! you are modifying a compound literal which is legal. C11-ยง6.5.2.5/4: If the type name specifies an array of unknown size, the size is determined by the initializer list as specified in … Read more