printf and long double

Yes — for long double, you need to use %Lf (i.e., upper-case ‘L’).

Leave a Comment