Yes — for long double
, you need to use %Lf
(i.e., upper-case ‘L’).
More Related Contents:
- printf not printing on console
- MinGW GCC: “Unknown conversion type character ‘h'” (snprintf)
- Printf long long int in C with GCC?
- Should C compilers immediately free "further unused" memories? [closed]
- Why does printf not flush after the call unless a newline is in the format string?
- What is the difference between ‘asm’, ‘__asm’ and ‘__asm__’?
- Is gcc’s __attribute__((packed)) / #pragma pack unsafe?
- Printing leading 0’s in C
- When to use earlyclobber constraint in extended GCC inline assembly?
- How to implement getch() function of C in Linux?
- What is the argument for printf that formats a long?
- How are variable arguments implemented in gcc?
- How to printf “unsigned long” in C?
- __attribute__((const)) vs __attribute__((pure)) in GNU C
- memory alignment within gcc structs
- Passing too many arguments to printf
- What does -fwrapv do?
- Why does a=(b++) have the same behavior as a=b++?
- Wrong format specifiers in scanf (or) printf
- What primitive data type is time_t? [duplicate]
- Is it possible to print out only a certain section of a C-string, without making a separate substring?
- How do I link object files in C? Fails with “Undefined symbols for architecture x86_64”
- What precisely does the %g printf specifier mean?
- How to tell GCC to generate 16-bit code for real mode
- How to get the size of a C function from inside a C program or with inline assembly?
- Why is execstack required to execute code on the heap?
- GCC – no warning about an uninitialized array with -O0
- What is the difference between %f and %lf in C?
- Order of fields when using a bit field in C
- conflicting types error when compiling c program using gcc