//打印一个数组
#include<stdio.h>
//初始化一个3行4列的数组
void Init_Array(int b[3][4], int row, int col)
{
for (int i = 0; i < 3; ++i)
{
for (int j = 0; j < 4; ++j)
{
b[i][j] = i + j;
}
}
}
//打印函数
void Print_Array(int b[3][4], int row, int col)
{
for (int i = 0; i < 3; ++i)
{
for (int j = 0; j < 4; ++j)
{
printf("%-5d", b[i][j]);
}
printf("\n");
}
printf("\n");
}
int main()
{
int a[3][4] = {};
Init_Array(a, 3, 4);
Print_Array(a, 3, 4);
return 0;
}