{ char a[30]=nice to meet you!; strcpy(a+strlen(a)
{ char a[30]=nice to meet you!; strcpy(a+strlen(a)
发布时间:2021-03-05 08:01:07
{ char a[30]=nice to meet you!; strcpy(a+strlen(a)/2,you); printf(%s\n,a);
网友回答
#include #include void main() { char a[30]=nice to meet you!; strcpy(a+strlen(a)/2,you); printf(%s\n,a); }输入出为:nice to you strlen(a)/2=17/2=8 ,a+strlen(a)/2表示从a+8处【a代表数组首地址】开始复制,nice to ”刚好6个字母和2个空格,然后复制you,输出nice to you