Question.5
A developer counts down a delay loop using an unsigned counter:
uint8_t i; for (i = 5; i >= 0; i--) { delay_ms(100); }
What happens?
Select Answer
Loops 6 times (i = 5, 4, 3, 2, 1, 0) and stops
Infinite loop — when i reaches 0 and decrements, it wraps to 255, which is still >= 0
Loops 5 times and stops
Compilation error — unsigned cannot be compared with 0