Current location - Plastic Surgery and Aesthetics Network - Plastic surgery and medical aesthetics - I just learned C language, and I have some questions to ask!
I just learned C language, and I have some questions to ask!
a =(int)(7.0/4); The value of is 1.75.

It should be 1, (int) has converted the result into plastic surgery, and a = int (7.0/4); The result is 1! The result of a=float(7/4) is 1. No matter what the data type of A is (float or int, the result can also be a char type within 255), the result is plastic after (int) forced type conversion, and only the integer part is taken!