char s[ ]="Hello!" char s[ ]={'H','e','l','l','o'''!'}长度分别是多少?char s[ ]={'H','e','l','l','o'''!'}是字符数组,长度为6char s[ ]="Hello!" 为字符串,有7个元素,因为最后一个字符串结束符\0不计入长度,所以长度

来源:学生作业帮助网 编辑:作业帮 时间:2024/05/02 20:08:29
char s[ ]=

char s[ ]="Hello!" char s[ ]={'H','e','l','l','o'''!'}长度分别是多少?char s[ ]={'H','e','l','l','o'''!'}是字符数组,长度为6char s[ ]="Hello!" 为字符串,有7个元素,因为最后一个字符串结束符\0不计入长度,所以长度
char s[ ]="Hello!" char s[ ]={'H','e','l','l','o'''!'}长度分别是多少?
char s[ ]={'H','e','l','l','o'''!'}是字符数组,长度为6
char s[ ]="Hello!" 为字符串,有7个元素,因为最后一个字符串结束符\0不计入长度
,所以长度也为6

char s[ ]="Hello!" char s[ ]={'H','e','l','l','o'''!'}长度分别是多少?char s[ ]={'H','e','l','l','o'''!'}是字符数组,长度为6char s[ ]="Hello!" 为字符串,有7个元素,因为最后一个字符串结束符\0不计入长度,所以长度
不正确 第二个要记录长度的,是7

不对,第二个应该是7

明摆着不对