请教一个问题&谢谢……&……
为什么输出结果是0# include <stdio.h>
int main (void)
{
void average (int *p);
int a[3][4]={{89,78,98,87},{89,98,87,90},{78,98,89,87}};
average (*a);
getch();
}
void average (int *p)
{
int *q;
float sum=0;
float aver;
q=p+12;
for (;p<q;p++)
{
sum=sum+(*p);
}
aver = sum/12;
printf("average is %d\n",aver);
}