ProgrammingHardTCS NQT · Infosys

unsigned char x = 100; x += 200; What is x?

  1. A. 44
  2. B. 300
  3. C. 0
  4. D. 144

Correct answer: A. 44

100 + 200 = 300, and storing it in unsigned char reduces it modulo 256 to 44.

More C Programming questions

Exams that ask this topic