Short is a family of integer variables defined in C language. There are three kinds of integers in C language, namely short, int and long. Int is an integer, short is a short integer, and long is a long integer.
In C language, short is one of defining a family of integer variables. For example, short I; ; Represents the variable I that defines a short integer.
length
According to different program compilers, the number of bytes defined by short is different.
The short integer variable defined by the standard cannot be less than 16 bits, that is, two bytes.
Limits.h in the compiler header folder defines the size that short can represent: short minimum ~ SHRT _ maximum.
In 32-bit platforms such as windows(32-bit), the short is generally 16 bits.
Characteristics, numbers, maximum and minimum values of basic data types.
1、
Basic type: short? Binary number: 16?
Packaging class: java.lang.Short?
Minimum value: short. min _ value =-32768 ( 15 of-2)。
Maximum value: short. max _ value = 32767(65438+2 to the 5th power-1).
2、
Basic type: int binary digits: 32
Packaging class: java.lang.Integer
Minimum value: integer. min _ value = -2147483648 (-2 power of 31).
Maximum: integer.max _ value = 2147483647? (3 1 squared-1)
3、
Basic type: long binary digits: 64
Packaging class: java.lang.Long
Minimum value: long. Min _ value =-9223372036854775808 (-2 to the 63rd power).
Maximum value: long.max _ value = 9223372036854775807 (2 to the 63rd power-1).
4、
Basic type: floating-point binary number: 32
Packaging class: java.lang.Float
Minimum value: float.min _ value =1.4e-45 (power of -65438 of 2 +049).
Maximum value: float.max _ value = 3.4235e38? (2 to the power of 128-1)
5、
Basic Type: Double Binary Number: 64
Wrapper class: java.lang.Double
Minimum value: double precision. Min _ value = 4.9e-324 (-1074 to the second power).
Maximum value: double.max _ value =1.79691348 623157e308? (2 to the power of 1024-1)