[c] Correct way of passing 2 dimensional array into a function