填空题 以下程序的输出是{{U}} 【7】 {{/U}}。 main() { char str1[]="How do you do",*pl=str1; strcpy(str1+strlen(str1)/2,"es she"); intf("%s/n",p1);
  • 1、
【正确答案】 1、How does she    
【答案解析】[评析] strcpy(str1,s1):字符串拷贝函数,作用是将字符串s1拷贝到字符数组str1中去。strlen(str):测试字符串str的长度,函数的值为字符串中实际长度,不包括‘/0’在内。本题中strlen(strl)的值为13,则strcpy(strl+strlen(strl)/2,"es she");相当于strqoy(strl+6,"es she");因此可得答案为How does she。