Skip to content
Quiz · Arrays and slices · lesson 2 of 10

Quiz — an array copy

What does the program print?

GO
package main

import "fmt"

func main() {
    a := [3]int{1, 2, 3}
    b := a
    b[0] = 9
    fmt.Println(a[0], b[0])
}

Subscribe to take the course

The course is free. Sign in with Telegram and subscribe to the channel to open every lesson.

Sign in another way