Why does fmt.Println(s[0]) print 108 for s := "labex", while fmt.Printf("%c", s[0]) prints l?
fmt.Println(s[0])
108
s := "labex"
fmt.Printf("%c", s[0])
l
%c always prints l regardless of the supplied value.
%c
Println permanently converts the string's first character to an integer.
Println
String indexing returns the encoded byte value, and %c renders that numeric code as a character.
Index zero means the 108th character because Go indexes from one.