I try to defined an array pass it to the function that doesn't define the size of the argument, errors occur however.
package main
import "fmt"
func main() {
var a=[5]int{1,2,3,4,5}
f(a,5)
fmt.Println(a)
}
func f(arr []int,size int) {
for i,x:=range arr {
fmt.Println(i,x)
arr[i]=100
}
}
cannot use a (type [5]int) as type []int in argument to f