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

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

javascript - firefox memory leak -

Trying to import CSV file to a SQL Server database using asp.net and c# - can't find what I'm missing -