C语言定义动态数组需要用到动态内存分配函数,参考代码如下:includeincludeint main(){ int a=NULL,n,i;scanf("%d",&n);a=(int )malloc(n*sizeof(int));for(i=0;i printf("请输入二维数组的行列数n和m:");scanf("%d%d",&n,&m);p=(int **)malloc(sizeof(int)*n);p[i]=(int *)malloc(si...