Mega Code Archive
Categories
/
C Tutorial
/
Printf Scanf
Precision
Precision indicates the minimum number of digits printed for type integers d, i, o, u, x, and X. #include
main() { printf("%10.4d\n", 35); } 0035 10 is the field-width. 4 is the precision.