121. Data Conversion and Encoding-i

Question.1

A developer converts the integer 123 to an ASCII string for UART display:

int num = 123;
char str[5];
int i = 0;
while (num > 0) {
   str[i++] = (num % 10) + '0';
   num /= 10;
}
str[i] = '\0';
printf("%s", str);

What does this print?

Need Help? Refer to the Quick Guide below

Select Answer