By default, printf() seems to align strings to the right.
printf()
printf(\"%10s %20s %20s\\n\", \"col1\", \"col2\", \"col3\"); /* col1
There is no printf() format specifier to centre text.
You will need to write your own function or locate a library which provides the functionality that you're looking for.