Question.1
A developer builds a response string for UART transmission:
char resp[4]; resp[0] = 'O'; resp[1] = 'K'; resp[2] = '\r'; resp[3] = '\n'; printf("%s", resp);
What happens when printf is called?
printf
Select Answer
Prints OK followed by carriage return and newline
OK
Prints only OK and \r and \n are ignored
\r
\n
Prints OK\r\n followed by garbage characters
OK\r\n
Compilation error — resp is too small
resp