代码运行后显示的结果是错的
用代码块功能插入代码,请勿粘贴截图
#include<stdio.h>
int main()
{
int a[3][4] = { {1,2,3},{1,2},{1} },b[12],i,j,c,b;
for (c = 1,i=0,j=0; c < 12; c++,j++) {
b[c] = a[i][j];
if (j > 4) {
j = 0;
i += 1;
}
printf("%d", b[c]);
}
return 0;
}
想写一个二维数组转换一维数组