![](https://static.youtibao.com/asksite/comm/pc/images/content_title_q.png)
有以下程序: #include <stdio.h> #include <string.h> main() {char p[] = {'a','b','c'] ,q[10
有以下程序: #include <stdio.h> #include <string.h> main() { char p[] = {'a','b','c'] ,q[10] = {'a','h','c'} prinff("% d % d\n" , strlen (p) , strlen (q) );以下敘述中正確的是()。
A.在給p和q數組賦初值時,系統(tǒng)會自動添加字符串結束符,故輸出的長度都為3
B.由于P數組中沒有字符串結束符,長度不能確定;q數組中字符串長度為3
C.由于q數組中沒有字符串結束符,長度不能確定;p數組中字符長度為3
D.由于p和q數組中沒有字符串結束符,故長度都不能確定
![](https://static.youtibao.com/asksite/comm/pc/images/content_title_a.png)