|
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.
|