As far as I had understood it, the %hhu format specifier should have the range of an unsigned char. However, in some compilers I test it in, it seems to have the range of an unsigned short instead. Is there a reason for this?
I tried using %hhu to print, for instance, 65535. I would expect this to print 255 on the assumption the value would be cast to an unsigned char. However in CodeBlocks and Tiny C Compiler, I instead get 65535. If I instead try to print 65536, it prints 0, as I would have expected if I had instead used %hu (with one h).
In OnlineGDB, however, I get the behaviour I would have expected.