Current location - Plastic Surgery and Aesthetics Network - Plastic surgery and beauty - Why is main(){ int a =-2L;-2l; printf("%d ",a); The output result is -2.
Why is main(){ int a =-2L;-2l; printf("%d ",a); The output result is -2.
Because int a =-2L;;

In c language, adding l after the number means long int.

So the value is -2, and the long int is stored.

2L International Airport

Is to convert long int -2 into int and store it in a.

Long int and int are the same in the compiler now.

So the output result is -2.