HexLibraryHexLibrary
</> HexCodeSign inSign up
PythonJavaScriptTypeScriptCC++JavaPHPGoRustRubyBashSQLLuaPerlCOBOLPascalDelphiFortranDartSwiftC#JuliaGroovyRElixirHaskellKotlinScalaClassic ASPClipperMS-DOS
LESSONS
Introduction to GoVariablesData TypesOperatorsStringsArray & SliceMap (Dictionary)Conditions (if / switch)Loops (for)Functions
REFERENCE
📖 Overview
🖥️ Output
fmt.Println()fmt.Printf()fmt.Sprintf()
📦 Variables
🔢 Numbers & Math
✍️ String
📋 Array & Slice
🗂️ Map
🔁 Condition & Loop
🧩 Function
Go›REFERENCE›Output›fmt.Printf()

fmt.Printf()

Formatted output (does not add a newline).

Syntax

fmt.Printf("format", values...)

Description

Prints with placeholders: %d for number, %s for text, %v for any value, %T for type. Add \n for a newline.

Example

Loading editor…

Expected output

Alex is 36 years old

When to use?

Tables, formatted reports.

Related commands

fmt.Println()fmt.Sprintf()
← fmt.Println()fmt.Sprintf() →
HexLibraryHexLibrary

Learn programming more clearly. Every command is explained line by line with colors, reinforced with runnable exercises, test your code instantly — all in one place, free.

Learn

  • Home
  • Languages & Lessons
  • HexCode

Company

  • About
  • Contact

Legal

  • Privacy Policy
  • Terms of Use

Other Projects

  • HexToolz
  • Free Service Manuals
© 2026 HexLibrary · The clearest way to learn code