[Solved] i am getting index out of range error on running the below code
copy_numbers is of size 0, just as you initialized it. If I add the following before your first for loop: fmt.Println(numbers) fmt.Println(copy_numbers) I get: [5 2 3 5 3] [] the copy builtin copies up to the length of either argument, as mentioned in the docs: Copy returns the number of elements copied, which will … Read more