Skip to content

Latest commit

 

History

History
37 lines (25 loc) · 436 Bytes

README.md

File metadata and controls

37 lines (25 loc) · 436 Bytes

Go 每日一题

今日(2023-05-20)的题目如下

写出程序运行的结果:

package main

import (
    "fmt"
)

func main(){
    s := make([]int, 10)
    s = append(s, 1, 2, 3)
    fmt.Println(s)
}
🔑 答案解析:

结果

[0 0 0 0 0 0 0 0 0 0 1 2 3]

考点

切片追加, make 初始化均为 0