3 ms·
I don't know if POSIX specifies CHAR_MAX, but on most systems, storing the value into a char will change the value, making it everything but 416: https://tio.ru
by NieDzejkob 7y ago
I don't know if POSIX specifies CHAR_MAX, but on most systems, storing the value into a char will change the value, making it everything but 416: https://tio.run/##S0oszvifnFiiYFeSWlyil6xgY@Pq7/Y/M69EITcxM0@jLD8zRVOhmktBITkjsUghUcFWQR0ItRQMja2BgkWpJaVFeQqJ1ly1/4H6uLjSk5MVICZx6ekn6uWXlnClJmfkK6jY/wcA https://tio.run/##S0oszvifnFiiYFeSWlyil6xgY@Pq7/Y/M69EITcxM0...
- deleted 7y ago[deleted]
- deleted 7y ago[deleted]
- m_kim 7y agoMy mistake: We have (32*13) with minimal possible CHAR_BIT is 8. So it either 416 for char bigger then eight bits, or 160 for unsigned eight bits char, or -96 for signed eight bits char. Then it extended to the signed integer value (one of this three values), and then we got result as (int)(status & 0377). For all three cases result will be 160.