说实话你这问题我没太看懂
例子intnum[3]
=
{10,
20,
30}
在内存是这样存储的
num
0000000a,00000014,0000001e
//16进制形式
你给起始地址函数,那函数就指向了num的地址,int规定了他是16位的,所以引用的时候,就可以按顺序引用了。
传入函数大多都有一个范围值,以确定作用数组多少元素,以上例子数3。
#include"stdio.h"#include"string.h"
int main()
{
char name[4][15]
int i,j
float score[3][7]
for(i=0i<3i++)
{
printf("enter a student name and five cuase score(english computer stat politics C):\n")
scanf("%s%f%f%f%f%f",name[i],&score[i][0],&score[i][1],&score[i][2],&score[i][3],&score[i][4])
score[i][6]=0
for(j=0j<5j++)
score[i][6]=score[i][j]
score[i][5]=score[i][6]/5
if(score[i][6]>=420)
{
puts(name[i])
for(j=0j<7j++)
printf("%.2f\t",score[i][j])
printf("\n")
}
}
printf("enter you want find name :")
scanf(name[3])
for(i=0i<3i++)
if(strcmp(name[i],name[3])==0)
printf("English score : %.2f\n",score[i][0])
}