Skip to content
RED SAGSkills
medium10 pts · first answer countsembedded-cinteger-types

Comparing int with unsigned

What does this code print on a 32-bit MCU?

int i = -1;
unsigned int u = 1;
if (i < u) {
  printf("less");
} else {
  printf("greater");
}
Choose one answer

Discussion 0

Join free to post in the discussion.

Related questions