试题题干
设char s[20]="Computer";,则strlen(s)的值是
参考答案
试题解析
函数strlen()的功能是测量字符串(字符串常量或字符数组)的实际长度(不包含字符串结束标志符‘\0’)。char s[20]="Computer";故strlen(s)的值是8。
设char s[20]="Computer";,则strlen(s)的值是
函数strlen()的功能是测量字符串(字符串常量或字符数组)的实际长度(不包含字符串结束标志符‘\0’)。char s[20]="Computer";故strlen(s)的值是8。