在上例中,找出有一门以上不及格的学生,输出其全部成绩。

void search( float (*p)[4] , int n)
{
    int i , j , flag;
    for(j=0 ; j<n %d="" (i="0" );="" *(*(p+j)+i)="" ,="" :="" ;="" <="" \"="" \",="" are="" code="" fails="" flag="1" for="" for(i="0" his="" i++)="" i<4="" if(*(*(p+j)+i)<60)="" if(flag="1)" j++)="" j+1);="" printf(\"%5.1f="" printf(\"no.="" scores="" {="" }=""></n>

程序运行结果:

No.1 fails,his scores are: 65.0 57.0 70.0 60.0
No.2 fails,his scores are : 58.0 87.0 90.0 81.0

例10.15