Go Program to Print First Character in a String

Write a Go Program to find and Print the First Character in a String. We can use the index position to access the string characters. Here, strFirstChar[0] returns the first character in a given string strFirstChar. package main import “fmt” func main() { var strFirstChar string strFirstChar = “Tutorial Gateway” fmt.Println(strFirstChar) firstChar := strFirstChar[0] fmt.Printf(“The … Read more