CP CVDT Q20

  • Option : C
  • Explanation : In C, negating an unsigned integer uses modular arithmetic. For a 16-bit unsigned int, the possible values range from 0 to 65535. The result of -a is calculated modulo 65536. Given a = 0x6DB7, we calculate 0x10000 - 0x6DB7 = 0x9249. Therefore, the correct answer is option C (0x9249). Option B is incorrect by one, while option D represents the result for a 32-bit unsigned integer.
Cancel reply

Your email address will not be published. Required fields are marked *


Cancel reply

Your email address will not be published. Required fields are marked *