正在加载图片...
例2:试判断下列数组定义是否合法 int student[35; char name [20]; float score[35: 一# define student35 float no student[student]: int score student(student*] int person(10) int n=10, a[n: 3、数组元素的引用 定义了数组以后,就可使用它了 规定:只能引用数组元素,不能一次引用一个数组 引用方法:数组名[下标] 如: student[1],name[15]name]等。例2:试判断下列数组定义是否合法: – int student[35]; – char name[20]; – float score[35]; – #define student 35 float no_student[student]; int score_student[student*3]; – int person(10); – int n=10, a[n]; 3、数组元素的引用 定义了数组以后,就可使用它了。 规定:只能引用数组元素,不能一次引用一个数组。 引用方法:数组名[下标] 如:student[1],name[15],name[i]等
<<向上翻页向下翻页>>
©2008-现在 cucdc.com 高等教育资讯网 版权所有