2.1:int, long, short types of differences
the short, int, and long types all represent integer values, and the size of the storage space is different. In general, the short type is half the machine word length, the int type is a machine word length, and the long type is one or two machine word lengths.
The difference between 2.2:unsigned and signed
signed denotes an integral type with a sign, with a value of 128 to 127;
unsigned denotes an integer with no sign, with a value of 0 to 255;
2.3: If the short type occupies 16 bits on a machine, what is the maximum number that can be assigned to the short type? What is the maximum number of unsigned short types?
2^16=65536, so the short type should contain the sign, -32728~32727, the maximum number is 32727;unsigned short does not contain the sign, so the value is 0~65535, the maximum number is 65535;
2.4: What is the assigned value when assigning a value of 100 000 to a 16-bit unsigned short object?
Direct binary calculation, 32 or 65568 (over value) or larger.
2.5:What is the difference between a float type and a double type?
float represents the single-precision type, and double represents the type of doubles. The general float type is represented by a single word (32 bits) , and the double type is represented by two characters (64 bits) .
C + + premier Second class post-title