strlen (字符数组名) char s【100】; n = strlen(s); strlen()用来计算指定的字符串s 的长度,不包括结束字符"\0"。 转载于:https://www.cnblogs.com/wshyj/p/6011005.html