I can print with printf as a hex or octal number. Is there a format tag to print as binary, or arbitrary base?
I am running gcc.
printf(\"%d %x %o
Use:
char buffer [33]; itoa(value, buffer, 2); printf("\nbinary: %s\n", buffer);
For more ref., see How to print binary number via printf.