posted 18 years ago
In the shift operator, 8 << -1 is the same as 8 << 31, so the 1 bit is shifted out of the int, so you have 0.
Also if you bitwise and -1 with another number, it doesn't change that number since the bit representation of -1 is all 1s.
0x1f = 31.
So none of the options match the output.
[ September 18, 2006: Message edited by: Keith Lynn ]