That v needs to be an array of 2 elements, and k needs to be an array of 4 elements.

Adjust your input so you're actually providing input from two suitably sized arrays (and not naked pointers to nowhere). You have to do more than simply declare variables of the same type as the parameters, you have to think about how those variables are going to be used (this is especially important wherever pointers are involved).