Current location - Plastic Surgery and Aesthetics Network - Plastic surgery and beauty - If a is an integer variable, the following statement a =-2L;; printf("%d\n ",a);
If a is an integer variable, the following statement a =-2L;; printf("%d\n ",a);
When an integer constant appears in a program, if it belongs to the value range of int type, then the compiler will treat this constant as an ordinary integer, otherwise it will be treated as a long integer. In order to force the compiler to treat this constant as a long int, you need to add a letter L (or L) after it. To show that it is an unsigned constant, you can add the letter u (or u) after it. To indicate that a constant is long and unsigned, you can use L and U in combination, for example, a=2UL, and the order of letters L and U is case-independent.