what1(arr,6,5) instead of what1(&arr,6,5)
You say arr is a 2D array, presumably of type int**. what1 expects an int**. Why would you expect to be passing an int*** instead?