请高手指教一下

goodboy5201314 goodboy5201314 墨衍会员 · AI 创作全网分发 墨衍智能分发 通过墨衍一键同步至各平台 可同步平台 CSDN微信公众号微博知乎掘金百家号博客园抖音小红书 你的文章也可以这样分发 墨衍会员 ¥399起/年,写一次发全网 我也要 + 加入社区
#include<stdio.h>

main()
{
static float score[][4]={{78, 89, 67, 78}, {98, 76, 87, 90}, {66, 88, 98, 86}};
float *search();
float *p;
int i, m;
printf("Please input the numbers of student:\n");
scanf("%d", &m);
printf("The scores of No.%d are :\n", m);
p = search(score, m);
for(i=0; i<4; i++)
printf("%5.2f\t", *(p+i));
}

float *search(pointer, n) //这里为什么不能这样:先定义全局变量int n;和float (*pointer)呢??
int n;
float (*pointer)[4];
{
float *pt;
pt = *(pointer+n-1);
return(pt);
}
...全文
评论 7
收藏 已收藏
分享
返回顶部
goodboy5201314
C语言 70,040 成员 243,237 内容