请问哪里有错(重新发个贴)
main(){void sb(float*p,int n);
void ab1(float(*p)[4],int n);
float score[3][4]={{65,67,70,60},{80,87,90,81},{90,99,100,98}};
sb(score,12);
sb1(*score,2);
}
void sb(float*p,int n)
{float*p_end;
float sum=0,aver;
p_end=p+n-1;
for(;p<=p_end;p++)
sum=sum+(*p);
aver=sum/n;
printf("sb=%5.2f\n",aver);
}
sb1(float*p,int n)
{ int i;
printf("the soreofNO.%d are:\n",n);
for(i=0;i<4;i++)
printf("%5.2f,",*(*(p+n)+i));
getch();
}
请问哪里有错
为什么?
还有应该怎样调试这道题