C语言 explain this questionplease give full explaination #include#includemain(){ char s1[80]="AB",s2[80]="CDEF";int i=0;strcat(s1,s2);while(s1[i++]!='0')s2[i]=s1[i];puts(s2);}

来源:学生作业帮助网 编辑:六六作业网 时间:2024/12/20 09:16:38
C语言explainthisquestionpleasegivefullexplaination#include#includemain(){chars1[80]="AB",s2[80]="CDEF"

C语言 explain this questionplease give full explaination #include#includemain(){ char s1[80]="AB",s2[80]="CDEF";int i=0;strcat(s1,s2);while(s1[i++]!='0')s2[i]=s1[i];puts(s2);}
C语言 explain this question
please give full explaination
#include
#include
main()
{ char s1[80]="AB",s2[80]="CDEF";
int i=0;
strcat(s1,s2);
while(s1[i++]!='0')
s2[i]=s1[i];
puts(s2);
}

C语言 explain this questionplease give full explaination #include#includemain(){ char s1[80]="AB",s2[80]="CDEF";int i=0;strcat(s1,s2);while(s1[i++]!='0')s2[i]=s1[i];puts(s2);}
#include
#include
main()
{ char s1[80]="AB",s2[80]="CDEF";
int i=0;
strcat(s1,s2); //将s2字符串加到s1的末尾,s1为"ABCDEF",s2为"CDEF"
while(s1[i++]!='0')
s2[i]=s1[i]; //i从1开始,即从第二个字符开始复制,所以结果为"CBCDEF"
puts(s2);
}