Current location - Plastic Surgery and Aesthetics Network - Plastic surgery and beauty - Please help me to explain how single-precision real constants and double-precision real constants are transformed into plastic constants in C language.
Please help me to explain how single-precision real constants and double-precision real constants are transformed into plastic constants in C language.
When calling the printf function, you must correspond to the type in the format character. Your printf output is an integer value of %d, and the parameter value is of type float. This is the problem. You must match the type. You can change the code to the following:

printf("%d ",(int)a); //cast to int type.