- %c: character
- %d, %i: integer
- %s: string
- %p: pointer
- %x, %X: hexadecimal
- %o, %O: octal
- %u: unsigned integer
- %f: float
Flag | Description |
---|---|
0 | zero-pad |
[number] | width |
+ | attach a '+'-sign to positive numbers |
-[number] | left-justified width |
* | specify the value as one of the variable arguments |
. | precision |
[space] | pad non-negative numbers with one space character |
- eoc(end of colour)
- red
- green
- blue
- yellow
- purple
- cyan
- black
- white
- Coverts an unsigned integer into binary string, add a number after a dot for precision (zero padding).