What is the output of the following C program? Assume a 16-bit…
PYQ UGC NET 2007Modified — slightly modified from the official paper; see the solution
What is the output of the following C program? Assume a 16-bit two's-complement int and an arithmetic right shift of negative values. main() { printf("%x", (unsigned int)(-1 >> 4)); }
- A.
ffff
- B.
0fff
- C.
0000
- D.
fff0
Attempted by 37 students.
Sign up free to check your answer
Sign up freeLoading lesson…

