❶ C語言如何檢查一個數組中元素的個數
對於字元數組str[N],判斷方法有以下三種:
第一種:用庫函數strlen
len=strlen(str);//數組長度
第二種:利用計數器
inti=0;while(str[i++]!='