View Single Post
mgb_phys
mgb_phys is offline
#9
Jan14-10, 02:35 PM
Sci Advisor
HW Helper
P: 8,961
Using %f in printf is perfectly valid, the printf call doesn't need to know how big the float is it can handle that when generating the output.

But in scanf you do need the "lf" so the call knows how big the destination variable is to copy the result into, you can't necessarily copy a float into a double or float at the same address correctly.