在线工具 在线编程 在线白板 在线工具 在线编程 在线白板

若有定义char s1[ ]="hello";char s2[ ]={'h','e','l','l','o'};int b;则下列语句正确的是

大哥大姐,打扰一下,若有定义char s1[ ]="hello";char s2[ ]={'h','e','l','l','o'};int b;则下列语句正确的是
最新回答
陌玍旳对白

2024-09-29 00:43:29

(C)正确

(A)s1+s2, 字符串类型数据不能直接用+加法,要用strcat
(B)s1==s2,不能直接比较,要用strcmp
(D)strcat(s1,s2) , s1的长度为6不够存储s1和s2的内容