Current location - Plastic Surgery and Aesthetics Network - Plastic surgery and beauty - If x is an integer variable and j is a real variable, when the statement is executed; x =(int)j; J also becomes an integer variable. Right? why
If x is an integer variable and j is a real variable, when the statement is executed; x =(int)j; J also becomes an integer variable. Right? why
J has not changed. The calculation method is as follows: take the value stored in J into the register and store it in floating-point format, then change the format of the value in the register to integer data, and finally store the integer data in the register in X, which is the same as x= 1.5; Or x = (int)1.5; The process is similar.

So the type of j variable will not change, and it is still a real variable.