❶ C语言如何检查一个数组中元素的个数
对于字符数组str[N],判断方法有以下三种:
第一种:用库函数strlen
len=strlen(str);//数组长度
第二种:利用计数器
inti=0;while(str[i++]!='