I have a string that can be from 1 to 40 chars in length. I want to start printing in column 42. I cant figure out how to do it. The following ends in column 42. Is there a way to do this? Do I have to print out 41 spaces first?
Code:
printf("%42.40s\n", "Open DB no. 1");
yields:
Open DB no. 1
^
col 42