Classifying an Observation Counter Error
A community science system uses an 8-bit unsigned integer to count the total number of daily observations submitted by a specific school group.
On a particularly active day, the group submits 260 observations. The system records the total as 4.
A developer is reviewing the system logs to classify the error.
Which type of error explicitly occurred in this scenario?
A
A syntax error, because the system could not parse the input value of 260.
B
A fixed-width overflow error, because 260 exceeds the maximum value representable by an 8-bit unsigned integer.
C
A runtime error, because the system crashed when attempting to store the value.
D
A logic error, because the program incorrectly added the observations.
Question Leaderboard
Not enough data yet to show leaderboard.
