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
There is no formatting function in the C standard library to output binary like that. All the format operations the printf family supports are towards human readable text.