Question.2
A developer calculates a PWM duty cycle percentage:
uint8_t on_time = 3; uint8_t period = 10; uint8_t duty = (on_time / period) * 100; printf("%u%%", duty);
Expected output: 30%. What does it actually print?
Select Answer
0%
30%
33%
Compilation error — % is not a valid format specifier