Generating Random Characters

Report a typo

Suppose you are working on a project to generate random characters.
You have the code below

func main() {
    <1> = := "abcdefghijklmnopqrstuvwxyz"
    rand.<2>(time.Now().UnixNano())
    randomPosition := rand.Intn(len(charset))
    c := charset[<3>]
    fmt.Println(<4>(c))
}


There are some words missing in the code highlighted as <1>, <2>, <3>, <4>. Match them with the correct placeholders

Match the items from left and right columns
<1>
<2>
<3>
<4>
charset
randomPosition
string
Seed
___

Create a free account to access the full topic