Which data type in Go is used to represent a single Unicode character?
- byte
- char
- rune
- string
In Go, the rune data type is used to represent a single Unicode character. Runes are based on the UTF-8 encoding scheme and allow developers to work with individual characters in Unicode strings. The rune type is synonymous with int32 and provides Unicode support.
Loading...
Related Quiz
- Explain a situation where the use of the vendor directory could potentially cause issues in a Go project.
- The method Marshal in Go is used to _____ a struct into JSON.
- Suppose you're developing a game in Go where you need to manage different types of characters. How would you utilize structs to organize this data effectively?
- In Go templating, what is the significance of the "." (dot) operator?
- You're developing a RESTful API using Gorilla Mux. How would you implement authentication middleware to protect certain routes?