X,Y passing size for the array in C function

前端 未结 3 1072
广开言路
广开言路 2020-11-27 23:14

I\'ve declared my function where I want to find the minimum from diagonals [0][0] ... [5][5] and [0][5]... [5][0]. I have the algorithm but my problem is with the actual fun

3条回答
  •  野趣味
    野趣味 (楼主)
    2020-11-27 23:53

    double minimum(int rowsize,int size, double x[rowsize][size]){...} or simply

    double minimum(int rowsize,int size, double x[][size]){...}

    So specifying rowsize is optional.

    But here I guess it is square size x size so it will be

    double minimum(int size, double x[][size]){...}

    So you are correct in that.

    How to call it?

    minimum(10,x)

提交回复
热议问题