🎙 Free live masterclass · Sun, 29 Nov, 7:00 pm IST · Java Full Stack roadmap Register free →
Skills101
← Quiz: Data Representation: all 9 questions

Quiz: Data Representation · Question 2 of 9

In the overflow demo, which addition overflowed?

In the overflow demo, which addition overflowed?

  1. A.100 + 20
  2. B.100 + 50
  3. C.100 + (−50)
  4. D.None of them
Answer & explanation

Correct answer: 100 + 50

150 doesn't fit in −128..127 and wrapped to −106. (−100 + −50 also overflowed, wrapping to 106.)

Can you get the rest right without peeking?

Take the timed Quiz: Data Representation quiz free. Pass it to earn XP and count towards your certificate.

Start the quiz →