package
0.0.0-20240429050328-3be44a187b12
Repository: https://github.com/robertwang/golang_study.git
Documentation: pkg.go.dev

# README

Go每日一题

今日(2023-01-28)的题目如下

写出程序运行的结果:

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