2D array passing to a function

后端 未结 2 1502
梦如初夏
梦如初夏 2021-01-21 05:09

I\'ve been reading this question but I\'m not able to get the resulting code to solve the problem. How should I change this in order to make it work?

void print         


        
2条回答
  •  暖寄归人
    2021-01-21 05:50

    In your question you are passing arguments as pointer to an array. Do as given below :

    void print2(int (*array)[4],int n,int m)
    {
        int i,j;
        for(i=0;i

提交回复
热议问题