二位数组的复制
将S[2][2]复制给c[2][2];请问那里出错了呢?谢谢!!
#include <stdio.h>
main()
{
double s[2][2]={{0.1,0.2},{0.3,0.4}};
double c[2][2];
double copy2(double [],double [],int ,int );
copy2(s,c,2,2);
}
double copy2(double s[],double c[],int i1,int i2)
{
int n1,n2;
printf("copy2 is:\t");
for(n1=0;n1<i1;n1++);
{for(n2=0;n2<i2;n2++);
{
c[n1][n2]=s[n1][n2];
printf("%.2f\t",c[n1])[n2);
}
printf("\n");
}
return(0);
}