The printf and sscanf conversions for floating-point numbers : scanf float « printf scanf « C Tutorial






% ConversionUsesNotes
%ffloatprintf only.
%lfdoublescanf only.
%Lflong doubleNot available on all compilers.


4.23.scanf float
4.23.1.The printf and sscanf conversions for floating-point numbers
4.23.2.Floating-Point Input: %f
4.23.3.Floating-Point Input: %e %g %f