The limits.h header file in the C language standard library defines the largest macro of int-uint _ max without subscript, which can be printed directly by using the printf function.
# include & ltstdio.h & gt
# Contains? & lt restrictions.>
int? Master ()
{
Printf ("unsigned? Int max: %u\n ",? UINT_MAX? );
Return? 0;
}
Extended data:
for instance
In 16 bit system, int can store data in the range of -32768~32767, and unsigned can store data in the range of 0~65535.
Because in a computer, integers are stored in the form of complement, depending on the most significant bit. If it is 1, the signed number is negative, and if it is unsigned, it is interpreted as positive. In addition, if unsigned omits the last keyword, most compilers will think it is unsigned int.
Meaning in sql statement
Sql statement, when creating a data table.
Create table user {
User_id int is unsigned. ...
...
}
Unsigned means that the data item user_id is always a positive integer, or it can be an integer 0, which does not belong to a positive integer.
Baidu encyclopedia-unsigned int