void main( ){char *p="abcd\0efgh\0";printf("%d",strlen(p));}
\0是字符串结束符,所以你的字符串实际上只有abcd
strlen算的是abcd的字符数,不是刚好4个字母吗