unsigned int x = DEADBEEF
unsigned short y = FFFF
signed int z = -1 = FFFFFFFF (bit pattern for -1)
( x > (signed short) y ) → first y is type casted to signed short, now one operand is unsigned int and other operand is signed short, so signed short is promoted to unsigned int, sign extension will happen on y, so we’re actually checking ( DEADBEEF > FFFFFFFF ). This equates to False.
( x > z) → here, one operand is unsigned int and other is signed int, so signed int is promoted to unsigned int, so we’re actually checking ( DEADBEEF > FFFFFFFF ). This equates to False.
Thus, the program will not enter in both if statements.
Answer – A