Mega Code Archive

 
Categories / C Tutorial / Printf Scanf
 

Field-width

Field-width sets the least number of columns for output. #include <stdio.h> main() {     int i = 9;     printf(">%4d<",i); } 9 If the value is more than the specified column, field-width is ignored. #include <stdio.h> main() {     int i = 999999;     printf(">%4d<",i); } 999999