Hello i'm new to C and have some confusion Regarding fprintf
I'm trying to create a Data table and i want it to look exactly like this:
Rectangle A Rectangle B
SW corner Height Width SW corner Height Width
Most of my confusion is coming from the white spaces, surely there is a better way than just adding an empty String.
You can use width specifier:
printf("[%5d] [%-5d]\n", 42, 42);
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With