For printing double you can use %lf. : float number « Data Type « C Tutorial






#include <stdio.h>
main()
{

    double f1 = 123456789123456789.23456;

    printf("%lf \n", f1);
}
123456789123456784.000000








2.17.float number
2.17.1.C provides two main floating-point representations: float (single precision) and double (double precision).
2.17.2.Formats for representing floating points
2.17.3.Use the format %f for printing floating numbers
2.17.4.For printing double you can use %lf.