Question.4
A developer parses UART commands using strcmp:
char cmd[16]; uart_read_line(cmd, sizeof(cmd)); if (strcmp(cmd, "READ")) { execute_read(); } else { printf("Unknown command"); }
When the user sends "READ", what happens?
READ
Select Answer
execute_read() is called
execute_read()
"Unknown command" is printed
Unknown command
Depends on whether the UART adds a newline character
Compilation error — strcmp cannot compare with a string literal
strcmp