Standard library / fmt

fmt.integer-verbs

%d prints decimal; %b binary; %o octal; %O octal with 0o prefix; %x/%X hexadecimal. %c prints a Unicode code point; %U prints Unicode notation. # adds alternate formatting where supported. Expected stdout: '65 1000001 101 0o101 41 41 A U+0041\n'.

Formal Syntax & Structure

go syntaxgo
%d %b %o %O %x %X %c %U

Working Example

Example Snippetgo
package main
import (  "fmt")
func main() {  fmt.Printf("%d %b %o %O %x %X %c %U\n", 65, 65, 65, 65, 65, 65, 65, 65)}
Go Reference