Current location - Plastic Surgery and Aesthetics Network - Plastic surgery and beauty - The difference between c language (int)x and int x
The difference between c language (int)x and int x
(int)x is to cast x into int type, and int x is to declare a variable x of int type. That is to say, in (int)x, x does not belong to int type, but it should be used as int, such as converting float type into int. Of course, this forced type conversion may lose accuracy, so be careful when using it!