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
CleverLibre Social

CleverLibre Social is an inclusive social instance for open discussion, learning, and community.
All cultures welcome.
Hate speech and harassment strictly forbidden.