No, that's not possible. You're just doing something wrong. Try this:
#include <stdio.h>
int main(void)
{
double d = 9.4;
printf ("%f\n", d);
return 0;
Type: Posts; User: oogabooga
No, that's not possible. You're just doing something wrong. Try this:
#include <stdio.h>
int main(void)
{
double d = 9.4;
printf ("%f\n", d);
return 0;
You're right of course that it shouldn't matter, but sadly it does on gcc 4.7.1, at least. :(
The ell should just be ignored, but instead it gets weird.
E.g., your code snippet just prints...
Don't use %lf with printf. Just use %f for both float and double.
scanf needs %lf for a double, though.