Skip to main content
Journey Uncommon Logo
JourneyUncommon
hardGoslice header aliasing pitfallsSingle-choice MCQ

What does this print and why, in terms of the slice header and backing array?

func main() { a := []int{1, 2, 3, 4, 5} b := append(a[2:4], 6) b[0] = 99 fmt.Println(a, b) }