Follow

@b0rk regarding bottom center:
in C integer promotion will happen. (unsigned char)255 + (unsigned char)1 will first yeld 256 due to integer promotion. Then, if it is going to be assigned (for example) to an unsigned char, it will be converted back to yeld 0. For example the following prints 256:

<stdio.h>

int main()
{
unsigned char a = 255;
unsigned char b = 1;
printf("%u", a + b);
return 0;
}

Sign in to participate in the conversation
Qoto Mastodon

QOTO: Question Others to Teach Ourselves
An inclusive, Academic Freedom, instance
All cultures welcome.
Hate speech and harassment strictly forbidden.