P
Peter Nilsson
pete said:Eric said:char buff[(CHAR_BIT * sizeof(n) * 10 + 32) / 33 + 1];
char itoa_buff[(size_t)((sizeof(int) * CHAR_BIT - 1) / 3.3) + 3];
char utoa_buff[(size_t)((sizeof(int) * CHAR_BIT ) / 3.3) + 2];
I understand the +3 over +2 (for the '-'), but what is the point of
the '- 1' in the bitwidth calculation for signed int? Note that the
sign bit contributes additional value as well as the sign.