Because you cannot print a character with string formatting. You might also consider adding a format with something like this.
#define PRINTC(c,f,s) printf ("\033[%dm" f "\033[0m", 30 + c, s)
f has a format like printf
PRINTC (4, "%s\n", "bar")
will print blue bar
PRINTC (1, "%d", 'a')
will print red 97
baz Jun 04 '16 at 3:09 on 2016-06-04 03:09
source share