In a general-purpose computer, the value range of int data is-2147483648 ~ 2147483647 [-231~ 231];
Long range: -2 147483647 to 2 147483647, that is, -(2 3 1- 1) to (2 3 1- 1).
Int is the basic integer type of C language, which can meet the needs of processing general data. C language also provides four keywords that can modify int: short, long, signed and unsigned.
Extended data:
Using these four keywords: short integer, long integer, signed integer and unsigned integer, the C language standard defines the following integer types:?
1) short int (short) is a signed integer like int.
2) long int (short for long), a signed integer.
3) long long int (abbreviation: long long), a type added by C99 standard, a signed integer.
4) unsigned int (abbreviation: unsigned), an unsigned integer, cannot represent a negative number.
5) unsigned long int (abbreviation: unsigned long), an unsigned integer, cannot represent a negative number.
6) unsigned short int (abbreviation: unsigned short), an unsigned integer, cannot represent a negative number.
7) unsigned long long int (abbreviation: unsigned long long int), type plus C99, unsigned integer.
8) By default, all integer types that are not marked as unsigned are signed integers.
References:
Baidu encyclopedia-long integer