当前位置: 答题翼 > 问答 > 计算机类考试 > 正文
目录: 标题| 题干| 答案| 搜索| 相关
问题

以下程序的输出结果为( )。main( ){ char s1[40]=country s2[20]=side;int i=0 j=0;while(s


以下程序的输出结果为()。

main()

{ char s1[40]="country",s2[20]="side";

int i=0,j=0;

while(s1[i]!="") i++;

while(s2[j]!="") s1[i++]=s2[j++];

s1[i]=0;

printf("%s ",s1);

}

A side

B country

C sidetry

D countryside

请帮忙给出正确答案和分析,谢谢!

参考答案
您可能感兴趣的试题
  • 以下程序的输出结果为main(){ char *alpha[6]={"ABCD","EFGH","IJKL","MNOP","QRST","UVWX"}; ch

  • 以下程序的输出结果是main(){ char s[]="abcdef"; s[3]=’’; printf("%s ",s);}

  • 以下程序运行后 输出结果为 ______。main(){int a[2][3]={1 3 5 7

  • 以下程序的输出结果为()。main( ){ char c; int i;for(i=65;i<68;i) { c=i32;switch(c){

  • 有以下程序 #include main(); } 程序运行后的输出结果是

  • 以下程序输出的结果为 ______。main(){ char*alpha[6]={ABCD EFGH IJKL MNOP QRST UVW