1. What do the following two pieces of code output?

/ / 1.
func main(a) {
    s := make([]int.5)
    s = append(s, 1.2.3)
    fmt.Println(s)
}

/ / 2.
func main(a) {
	s := make([]int.0)
	s = append(s,1.2.3.4)
	fmt.Println(s)
}
Copy the code

2. What’s wrong with the following code

func funcMui(x,y int)(sum int,error){
	return x+y,nil
}
Copy the code

3. Difference between new() and make().

Check out “Golang is coming” or check out seekload.net for the latest interview questions and answers.