A-A+

以下选项中 没有编译错误的是A.charstr3[]={d e  u g

2022-08-12 19:02:23 问答库 阅读 197 次

问题详情

以下选项中,没有编译错误的是
A.charstr3[]={"d","e","b","u","g",""’};
B.charstrl[5]=""pass"",str2[6];str2=str1;
C.charname[10];name=""china"":
D.charstr4[];str4=""helloworld"";

请帮忙给出正确答案和分析,谢谢!

参考答案

正确答案:A
选项A是定义了字符数组str3[],并对其赋初值。选项B中语句str2=strl非法,字符数组不能直接赋值。选项C,D和选项B一致。

考点:错误