So I need to print for example a name and then an id (John 234543 ) where the name has 6 spaces for it and the id 7. So in this example I would do printf("%6s %d", "John", 234543); but I cant just leave my code as that because of the input is a 3 character after adding the spaced the id will move less than it should.
Ive tried with ("%-#s") and ("%#s") and ive tried like ("%%ds", int, "john"); where i was hoping the int could add there making the spaced but it didn't work
printf("%%ds", int, "john");
The output never works for every case just the one of them where the amount of characters is just right.