#include <stdio.h>
#include <string.h>
#include <stdlib.h>
void printarr2d(int (*a)[3],int row,int col);
int main()
{
int i,j;
int a[2][3] = {{1,2,3},{4,5,6}};
int b[4][3] = {{0,0,0},{0,0,0}};
memcpy(b[2],a,sizeof(int)*2*3);
printarr2d(b,4,3);
return 0;
}
/***********************************************
打印显示数组
************************************************/
void printarr2d(int (*a)[3],int row,int col)
{
int i,j;
for(i=0; i<row; i++)
{
for(j=0; j<col; j++)
{
printf("%d", a[i][j]);
}
printf("\n");
}
}