#include <stdio.h>
int main (void)
{
//对二维数组进行初始化
int a[3] [4] = {
{1, 2, 3, 4}
{5, 6, 7, 8}
{9, 10, 11, 12}
}
//输出二维数组的值
int i, j;
for (i=0, i < 3, i++)
{
for (j = 0, j < 4, ++j)
printf ("%-5d", a[i] [j]);
printf ("\n");
}
}
#include <stdio.h>
int main (void)
{
//对二维数组进行初始化
int a[3] [4] = {
{1, 2, 3, 4}
{5, 6, 7, 8}
{9, 10, 11, 12}
}
//输出二维数组的值
int i, j;
for (i=0, i < 3, i++)
{
for (j = 0, j < 4, ++j)
printf ("%-5d", a[i] [j]);
printf ("\n");
}
}