实例
#include <stdio.h>
float * search(float (*p)[4], int n)
{
// p + n为行地址概念
// * (p + n) 为元素地址概念
float * q = * (p + n);
return q;
}
void printf_score(float * s)
{
for (float * t = s; t < (s + 4); t++)
{
printf("%-10.2f", * t);
}
printf("\n");
}
int main()
{
float score[][4] = {{60, 70, 80, 90}, {60, 70, 80, 91}, {60, 70, 80, 92}, {60, 70, 80, 93}};
int n = 2;
float * s = search(score, n);
printf_score(s);
return 0;
}