I have being wondering why printf("%.d", 0);
outputs nothing, whereas it outputs something for any other number than 0, and printf("%d", 0);
outputs '0' as expected.
The only difference between the 2 codes is the precision. Here is what the documentation says about the precision :
An optional precision, in the form of a period . followed by an optional digit string. If the digit string is omitted, the precision is taken as zero. This gives the minimum number of digits to appear for d, i, o, u, x, and X conversions.
In that case the precision should just be ignored, no?