📜  传递 int 数组的长度 - C 编程语言代码示例

📅  最后修改于: 2022-03-11 15:04:42.680000             🧑  作者: Mango

代码示例3
//I suggest using strlen (of #include)
//if you want only the size of the occupied index

int prices[5] = { 1, 2, 3, 4, 5 };
int size = strlen(prices);
printf("%d", size); // 5