Question.6
A developer tries to normalize a UART command to uppercase:
char *cmd = "read"; cmd[0] = 'R'; // Capitalize first letter
Will this work?
Select Answer
Yes — cmd points to a writable character array
No — string literals are stored in read-only memory; modifying them is undefined behavior
Yes — but only on platforms with writable .rodata sections
No — char* cannot point to string literals