char p[20]={'a','b','c','d'},q[]="abc",r[]="abcde"; strcat(p,r);strcpy(p+st

问题描述:

char p[20]={'a','b','c','d'},q[]="abc",r[]="abcde"; strcat(p,r);strcpy(p+st
char p[20]={'a','b','c','d'},q[]="abc",r[]="abcde";
\x09strcat(p,r);strcpy(p+strlen(q),q);
\x09printf("%d\n",strlen(p));
怎么运行,结果为什么是6

strcat(p,r);后
p="abcdabcde"
strcpy(p+strlen(q),q);后p的第7位是'\0'
p="abcabc"
当然是6