整个数组所占字节数 除以 数组单个元素所占字节数
# include <stdio.h>
# include <stdlib.h>
# include <string.h>
int main(void)
{
int a[] = {1, 5, 7, 0, 10, 7, 3};//int类型在32位操作平台占4个字节
int b = (sizeof a) / (sizeof a[0]);//总数组元素所占字节数除以单个数组元素所占字节数
printf("b = %d", b);
printf("\n");
system("pause");
return 0;
}