Question 12.13

Why doesn't this code:

double d;
scanf("%f", &d);
work?


Unlike printf, scanf uses %lf for values of type double, and %f for float. See also question 12.9.


Read sequentially: prev next up top


This page by Steve Summit // Copyright 1995 // mail feedback