121. Data Conversion and Encoding-i

Question.7

A developer uses sprintf to format a sensor reading for UART output on an MCU with 2 KB RAM:

char buf[32];
sprintf(buf, "Temp=%d.%dC Hum=%d%%", t_int, t_frac, hum);

Another developer suggests using manual digit conversion instead. Why?

Need Help? Refer to the Quick Guide below

Select Answer