I've got the following printf statement:
printf("val=%-4.2lf", val);
However, val is never padded with spaces so the space taken up by val is different if there are 3 or 4 digits before the decimal. Shouldn't the 4 in the format specifier guarantee that there are at least 4 spaces?
Sorry for the newb question but it's been frustrating me.