Current location - Plastic Surgery and Aesthetics Network - Plastic surgery and medical aesthetics - What happens to integer overflow in C language?
What happens to integer overflow in C language?
Integer overflow in C language can be divided into unsigned integer overflow and signed integer overflow.

For unsigned integer overflow, C's specification has a definition-"The number after overflow will be modulo 2 (8 * sizeof (type)", that is, if an unsigned integer

Char( 1 character, 8 bits) overflows, and the overflow value will be modulo 256.