Skip to content

Instantly share code, notes, and snippets.

Embed
What would you like to do?
func main() {
var a [3]int = [3]int{1,2,3}
fmt.Println("Element at index is",a[1])
fmt.Println("Length of array is",len(a))
for i, v := range(a){
fmt.Printf("Index is %d, and value is %d \n",i,v)
}
q := [...]int{1, 2, 3}
fmt.Println("Length of array is",len(q))
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
You can’t perform that action at this time.