题目内容
请将代码补充完整。01 #include 0203 // strcpy函数的功能04 void cpystr(char*, char*);05 // strlen函数的功能06 int lenstr(char*);0708 int main()09 {10 char str1[50];11 char str2[50];12 gets(str1);13 gets(str2);1415 printf("两个字符串的长度分别为: %d %d", lenstr(str1), lenstr(str2));16 cpystr(str1, str2);17 printf("\n将str1字符串复制到str2字符串上: %s", str1);1819 return 0;20 }2122 void cpystr(char* str1, char* str2)23 {24 while(*str1++ =);25 }2627 int lenstr(char* str)28 {29 int len = 0;30 while(*str++)31 {32 ;33 }34 return len;35 }
查看答案
搜索结果不匹配?点我反馈
更多问题