The use of %% to designate a literal % in printf is not a recent convention. It was defined in K&R, first edition. Doug Ralph Cordery wrote: Though that may seem odd to our modern C-standardised eyes, it's understandable in that if it isn't a valid %f, etc., format specifier then it's a literal percent sign.