Why is it that scanf() needs the l in \"%lf\" when reading a double, when printf() can use \"%f
scanf()
l
%lf
double
printf()
%f
scanf needs to know the size of the data being pointed at by &d to fill it properly, whereas variadic functions promote floats to doubles (not entirely sure why), so printf is always getting a double.
scanf
&d
printf