Say the larger type allows numbers from 0 to 9999 and the smaller only 0 to 99.
Then if the variable with large type has value 287, after type casting to the smaller type, it becomes 87. Other example: 345 becomes 45, 66 remains 66. Essentially the modulo means the amounts “over” the max value of the smaller type is lost.
Latest Answers