/* c99: some statistics regarding long double and example of the use of the printf function */ #include #include int main() { long double ld = 1342344.42423412442344141232412L; printf("LEN:\n"); printf(" Float len: %zu\n", sizeof(float)); printf(" Double len: %zu\n", sizeof(double)); printf("Long double len: %zu\n", sizeof(long double)); printf("\nNUMBER OF SIGNIFICANT DIGITS:\n"); printf(" Float significant digits = %d\n", FLT_DIG); printf(" Double significant digits = %d\n", DBL_DIG); printf("Long double significant digits = %d\n", LDBL_DIG); printf("\nPRINTF:\n"); printf("%Lf\n", ld); printf("%Lg\n", ld); printf("%Le\n", ld); return 0; }