您好,欢迎访问三七文档
当前位置:首页 > 商业/管理/HR > 质量控制/管理 > c语言中函数返回值为指针的应用
#includestdio.hvoidmain(){printf(c语言中函数返回值为指针的应用:\n);floatscore[][4]={{60.23,45.0,78.9,99.0},{56.0,79.89,90.0,60.8},{57.6,78.7,93.45,55.67}};float*search(float(*pointer)[4],intn);float*p;inti,m;printf(enterthenumberofstudent:);scanf(%d,&m);printf(ThescoreofNo.%dare:\n,m);p=search(score,m);for(i=0;i4;i++)printf(%5.2f\t,*(p+i));printf(\n);}float*search(float(*pointer)[4],intn){float*pt;pt=*(pointer+n);returnpt;}输入1后,回车,运行结果如下图所示:
本文标题:c语言中函数返回值为指针的应用
链接地址:https://www.777doc.com/doc-2907813 .html