When i change the value U at 0 index , It changes the value of t and u at zero index why it is not changing the value of S. Please Explain I got stuck here.
package main import ( "fmt" ) func main() { var s []int var t []int s= make([]int,3) s[0]=100 s[1]=200 s[2]=300 t=append(s,400) fmt.Println(s,len(s),cap(s)) fmt.Println(t,len(t),cap(t)) var u []int u=append(t,500) fmt.Println(u,len(u),cap(u)) u[0]=9999 fmt.Println("//////////////////////") fmt.Println(s,len(s),cap(s)) fmt.Println(t,len(t),cap(t)) fmt.Println(u,len(u),cap(u)) } -- You received this message because you are subscribed to the Google Groups "golang-nuts" group. To unsubscribe from this group and stop receiving emails from it, send an email to golang-nuts+unsubscr...@googlegroups.com. To view this discussion on the web visit https://groups.google.com/d/msgid/golang-nuts/83571b55-1834-4aa8-994d-bc99df4ab0ee%40googlegroups.com.