Ways to represent function with multi-dimensional array parameters
可以将文章内容翻译成中文,广告屏蔽插件可能会导致该功能失效(如失效,请关闭广告屏蔽插件后再试): 由 翻译 强力驱动 问题: I'm currently learning function that work with multi-dimensional array in C. Let's say I have short myArray [ 10 ][ 30 ]. I have declared following function prototype to work with myArray . void first ( int n , short ar [][ 30 ]); void second ( int n , short ar [ 30 ]); void third ( int n , short (* ar )[ 30 ]); My understanding is that the ar parameter in both first and third function are equivalent. short ar[][30] in first function is equivalent to the short (*ar)[30] in third function because they are both pointer to array of 30