There is code:
#include <iostream>
int main(){
unsigned char a = 4, b = 255;
int g = (unsigned char)a + (unsigned char)b;
std::cout << g << std::endl;
return 0;
}
Result:
259
Why the result is 259, not 3? If there are added two unsigned char variables, there should be overflow, result should be 3 and then it should convert from unsigned char 3 to int 3.