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