{ char a[30]="nice to meet you!"; strcpy(a+strlen(a)/2,"you"
来源:学生作业帮 编辑:作业帮 分类:综合作业 时间:2024/05/11 12:23:16
{ 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
再问: strlen(a)/2=17/2=8 当中的17是怎么得来的???应该是14吧。
再答: "nice to meet you!"这个字符串有14个字母和3个空格组成,长度为17,空格也计算在内的
#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
再问: strlen(a)/2=17/2=8 当中的17是怎么得来的???应该是14吧。
再答: "nice to meet you!"这个字符串有14个字母和3个空格组成,长度为17,空格也计算在内的
{ char a[30]="nice to meet you!"; strcpy(a+strlen(a)/2,"you"
void main(){char ch[30]="nice to meet you!';strcpy(a+strlen(
main() {char a[2][4]; strcpy(a[0],"you");strcpy(a[1],"me");
A:Hello,Betty.Nice to meet you.
英语翻译A:Hello,Nice to meet you.B:Nice to meet you,too.A:What's
Nice to meet you!(2分钟内解决!) Nice=什么 A.pleased B.Well C.happy
-Nice to meet you.-( )A.Bye-bye.b.See you.
Nice to meet you —— A.Nice to meet you to B.And you c.Think
A:Nice to meet you,too.()Smith?()填什么?
char a[7]="abcdef" char b[4]="ABC" strcpy(a,b) printf("%c",a
Char a[]=”country’; Char b[]=”ganme” Strcpy(a,b) Printf(“%c”
Nice to meet you.Busy busy crowd can meet you is a kind of f