伊谢尔伦2017-04-17 13:05:49
Memory is allocated when the variable is defined and does not occupy memory when it is declared. A variable occupies a fixed size of memory from the time it is defined until the end of the variable's life cycle. It has nothing to do with whether or what data is saved in it
迷茫2017-04-17 13:05:49
Variables occupy memory when they are defined. The occupied size varies depending on the variable type. Assignment only changes the value stored in the memory block and has nothing to do with the allocated memory address.