golang试题-以下代码的输出是什么?
package main import "fmt" func main() { nums := []int{1, 2, 3, 4, 5} slice := nums[1:4] slice[0] = 10 fmt.Println(nums) }
package main import "fmt" func main() { nums := []int{1, 2, 3, 4, 5} slice := nums[1:4] slice[0] = 10 fmt.Println(nums) }
网友评论0