Question #132

Author: admin
tags: Go  
package main

import "fmt"

func main() {
	arr := [5]string{"Lia", "Ann", "Ned", "Ben"}

	slice1 := arr[0:3]
	slice2 := arr[0:2]

	slice1[1] = "Sam"

	fmt.Println(slice2)
}
What will be printed?
[Lia Sam]
[Lia Ann]
[Lia Ann Ned]
[Lia Sam Ned]
[Sam Ann]
[Sam Ann Ned]
Changes to slice elements affect elements of underlying array.
Both slices have the same underlying array.
Rate the difficulty of the question:
easyhard