Skip to content
RED SAGSkills
hard20 pts · first answer countsconcurrencyrtos

Garbled log text from two tasks

Two tasks call this helper and sometimes print each other's values. What is the root cause?

const char *fmt_temp(int t) {
  static char buf[16];
  snprintf(buf, sizeof buf, "%d.%dC", t / 10, t % 10);
  return buf;
}
Choose one answer

Discussion 0

Join free to post in the discussion.

Related questions