C ++ data type and variable type ., Data Type Variable type
Data Type
Numbers are free [not only belong to a certain type ]! But it can have different identities! Int, char, float, double, etc. It is stored in a memory location with different identities [storage rules!
Variable type
The memory number will not change. The change is to divide several bytes into a group and access the data according to the rules.
Int;
It means that a variable will be used in the future. This variable will occupy 4 bytes of space and use a to refer to the memory location and use int rules to access data.
Int a = 53;
Meaning: allocate a 4-bytes space in the memory, use a to refer to the memory location, and then use the int rule to access data. Next, determine if 53 is of the int type. If yes, the value is stored in the space according to the int rule. If not, it is not stored and discarded. The result is that the value 53 is int type data, store the value 53 in the memory according to the int specification.
[This code is divided into several steps. The calculator judges and executes the code step by step .]
Statement, just say, does not occupy the memory space;
Value assignment, occupying memory space;