c - How to have absolute padding in printf()? -


i tried

printf("%s %15s", string1, string2); 

and found out kind of left padding depends distance first string, if want absolute left padding counting left most?

you want pad first string on right, instead of padding second sting on left:

printf("%-15s %s",string1,string2); 

Comments

Popular posts from this blog

php - cannot display multiple markers in google maps v3 from traceroute result -

c# - DetailsView in ASP.Net - How to add another column on the side/add a control in each row? -

javascript - firefox memory leak -