# cat array.go
package main
import "fmt"
func main() {
var a [5]int
a[2] = 99
fmt.Println("array is:", a)
fmt.Println("len of array is:", len(a))
}
# go run array.go
array is: [0 0 99 0 0]
len of array is: 5
# cat array.go
package main
import "fmt"
func main() {
var a [5]int
a[2] = 99
fmt.Println("array is:", a)
fmt.Println("len of array is:", len(a))
}
# go run array.go
array is: [0 0 99 0 0]
len of array is: 5