Go Program to Print ASCII Values of All Characters

Write a Go Program to print the ASCII Values of all the available characters. For this, we use for loop that starts at zero and ends at 255. Within that, we used the printf statement to print the characters and their respective ASCII codes.

package main

import (

func main() {

    for i := 0; i <= 255; i++ {
        fmt.Printf("The ASCII value of %c = %d\n", i, i)
Go program to Print ASCII Values of All Characters 1

About Suresh

Suresh is the founder of TutorialGateway and a freelance software developer. He specialized in Designing and Developing Windows and Web applications. The experience he gained in Programming and BI integration, and reporting tools translates into this blog. You can find him on Facebook or Twitter.