I\'ve searched high and low, but in printf in C it seems that there\'s only zero fill and white space fill. I\'m looking to write my own fill, in this case using the asteris
The simplest way is probably to print into a buffer using snprintf() with space padding, then replace the spaces with asterisks afterwards:
void print_padded(double n)
{
char buffer[9];
char *p;
snprintf(buffer, sizeof buffer, "% 8.2f", n);
for (p = buffer; *p == ' '; p++)
*p = '*';
printf("%s", buffer);
}