Junior — Senior
What output will the program produce in example №49
livecode
Task condition
Determine what value will be printed after executing the following Go code:
src := []int{1, 2, 3}
sub := src[:2]
sub[0] = 2
fmt.Println(src[0]) // ?
livecode
Task condition
Determine what value will be printed after executing the following Go code:
src := []int{1, 2, 3}
sub := src[:2]
sub[0] = 2
fmt.Println(src[0]) // ?