This will first calculate b+3.14, the result is a floating point number, and then cast it to int (with decimal places rounded off), which is equivalent to
a=(int)(b +3.14)
As for the output of int and float using %f and %d, it will cause confusion in the number of digits. For specific calculations, you must first look at how floating point numbers are stored in the machine.