In C89, %lf caused undefined behaviour although it was a common extension to treat it as %f. The reason that one specifier can be used for two different types in printf is because of the default argument promotions ; arguments of type float are promoted to double when used to call a function and not matching a parameter in a function prototype. More @Wikipedia
Hover over any link to get a description of the article. Please note that search keywords are sometimes hidden within the full article and don't appear in the description or title.