int main(){ float score[3][4]={{60,78,89,91}, {56,76,66,80}, {100,98,92,93}}; float *search(float (*p)[4], int n); float *p; int n, i; scanf("%d", &n); p = search(score, n);//数组元素类型的指针 printf("No.%d's score: ", n); for(i = 0; i < 4; i++) // 往后数4个数 printf("%5.1f ", *(p+i)); return 0; } float *search(float (*p)[4], int n){ float *pt; pt = *(p + n); //返回&score[n][0],一个数组元素的地址 return pt; }
初级程序员
by: 藤原千花 发表于:2020-04-20 20:27:05 顶(0) | 踩(0) 回复
666
回复评论