# include "stdio.h"
Int main ()
{
Float grade [] [4]=60,70,80,90,56,89,67,88,34,78,90,66 {};//store performance
Float * search (float (* pointer) [4]);
Float * p;
int i,j;
for(i=0; i<3; I++)
{
P=search (grade a + I);
If (p==* (grade a + I))
Printf (" No. % d ", I);//output student id
for(j=0; j<4. J++)
Printf (" % 5.2 f ", * (p + j));//output meet the conditions of student achievement
printf("\n");
}
}
Float * search (float (* pointer) [4])
{
Float * pt;
int i=0;
Pt=NULL;
for(; i<4. I++)
If (* (* pointer + I) & lt; 60) pt=* pointer;
Return pt;
}
CodePudding user response:
Reference:# include "stdio.h"
Int main (int arg c, char * argv [])
{
Float grade [] [4]=60,70,80,90,56,89,67,88,34,78,90,66 {};//store performance
Float * search (float (* pointer) [4]);
Float * p;
int i,j;
for(i=0; i<3; I++)
{
P=search (grade a + I);
If (p) {//if (p==* (grade a + I)) {
Printf (" No. % d ", I + 1);//output student id
for(j=0; j<4. J++)
Printf (" % 6.2 f ", * (* (grade a + I) + j));//output meet the conditions of student achievement
printf("\n");
}
}
//system (" pause ");
return 0;
}
Float * search (float (* pointer) [4])
{
Float * pt;
int i;
Pt=NULL;
for(i=0; i<4. I++)
If (* (* pointer + I) & lt; 60) pt=(* pointer + I);
Return pt;
}
CodePudding user response:
The method of the building Lord:# include "stdio.h"
Int main ()
{
Float grade [] [4]=60,70,80,90,56,89,67,88,34,78,90,66 {};//store performance
Float * search (float (* pointer) [4]);
Float * p;
int i,j;
for(i=0; i<3; I++)
{
P=search (grade a + I);
If (p==* (grade a + I)) {
Printf (" No. % d ", I + 1);//output student id
for(j=0; j<4. J++)
Printf (" % 6.2 f ", * (p + j));//output meet the conditions of student achievement
printf("\n");
}
}
//system (" pause ");
return 0;
}
Float * search (float (* pointer) [4])
{
Float * pt;
int i;
Pt=NULL;
for(i=0; i<4. I++)
If (* (* pointer + I) & lt; 60) pt=* pointer;
Return pt;
}