Current location - Plastic Surgery and Aesthetics Network - Plastic surgery and beauty - A is an integer variable, and a=-2L printf(%d, a). Is it a legal procedure? If so, what is the result? What is the reason?
A is an integer variable, and a=-2L printf(%d, a). Is it a legal procedure? If so, what is the result? What is the reason?
The other is that int is 2 bytes and long is 4 bytes. In this case, if a long integer is assigned to a short integer, the result will be truncated and the computer will store the data together with its complement. The truncated -2 complement is:111165438. The number of words is limited, dizzy ~