1 2 3 4

C语言之sizeof函数求数组长度

#include <stdio.h>
#include <stdlib.h>


int main()
{
int add[] = { 1,256,12,621,62,3462,6,89999,87};


int g=sizeof(add) / sizeof(add[0]);

printf("add数组的长度是:%d\n", g);


system("pause");
return 0;
}

posted on 2020-12-09 21:38  三日坊主i  阅读(859)  评论(0)    收藏  举报

导航