array.md 261 字节
Newer Older
麻凡_'s avatar
麻凡_ 已提交
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36
# 数组
关于数组,下面声明错误的是:

## 答案

```Go

var arr0 [3]int = [3]int{1, 2, 3, 4}

```

## 选项

### A

```Go

var arr0 [5]int = [5]int{1, 2, 3}

```

### B

```Go

a := [3]int{1, 2}

```

### C

```Go

b := [...]int{1, 2, 3, 4}

```