Multiple choice technology programming languages

If you continuously increment a variable, it will become negative?

  1. True

  2. False

  3. Cannot continuously increment a variable

  4. It depends on the variable type

Reveal answer Fill a bubble to check yourself
D Correct answer
Explanation

Integer overflow behavior depends on the data type. Signed integers wrap around and become negative when incremented beyond their maximum value (e.g., 127+1=-128 for byte). Unsigned integers wrap to zero. The question tests understanding of type-specific overflow behavior.