#include<stdio.h> #include<string.h> int main() { char s1[]="你好"; char s2[]={'n','i','h','a','o','\0'}; printf("字符串s1长度=%d\n",strlen(s1)); printf("字符串s2长度=%d\n",strlen(s2)); return 0; }
没有错误啊~