int main(){
int a = -33553454;
unsigned long b = a;
return 0;
}
In the above example, a is first sign extend to a 64 bit value as a signed integer (meaning 1's will be placed on its left side), and the value is then assigned to b as an unsigned int.
Is it safe to say that, only the type of the original source operand matters (if its signed or unsigned) and the destination type is not taken into account in this case (since the destination is unsigned, you would think a would not get sign extended because the end result is unsigned anyways, and 0s would fill the left side of b. )