- 5
- 0
- 约 38页
- 2016-11-26 发布于广东
- 举报
第七章 指针 例 用指针函数,给定学生序号输出学生全部成绩 main() { float score[][4]={{60,70,80,90}, {56,89,67,88},{34,78,90,66}}; float *search(float (*pointer)[4],int n), *p; int i,m; printf(Enter the number of student:); scanf(%d,m); printf(The scores of No.%d are:\n,m); p=search(score,m); for(i=0;i4;i++) printf(%5.2f\t,*(p+i)); } float *search(float (*pointer)[4], int n) { float *pt; pt=*(pointer+n); return(pt); } pointer pointer+1 34 78 90 66 56 89 67 88 60 70 80 90 score数组 7.6 指针数组与多级指针 指针数组: 定义:数组中存储元素为指针的数组 用途:处理二维数组或多个字符串 [存储类型] 数据类型 *数组名[数组长度说明]; 指针所指向变量的数据类
原创力文档

文档评论(0)