下面是谭书上p247面的例子;
我运行的结果跟书上的不一样;
我用的是VC++;
#include"stdio.h"
int main()
{
float score[][4]={{60,70,80,90},{56,89,67,88},{34,78,99,66}};
float *search(float (*pointer)[4]);
float *p;
int i,j;
for(i=0;i<3;i++)
{
p=search(score+i);
if(p==*(score+i));
{
printf("No.%d score:",i);
for(j=0;j<4;j++)
printf("%5.2f\t",*(p+j));
printf("\n");
}
}
return 0;
}
float *search(float (*pointer)[4])
{
int i;
float *pt;
pt=*(pointer+1);
for(i=0;i<4;i++)
if(*(*pointer+i)<60)pt=*pointer;
return(pt);
}