17、下面程序的运行结果是#include#inc1udemain(){chara[80」="AB",b[80]="LMNP";inti=0;strcat(a,b);whi1e(a[i++]!='\0')b[i]=a[i];puts(b);}
A. LB
B. ABLMNP
C. AB
D. LBLMNP
18、下面程序段是输出两个字符串中对应字符相等的字符。请选择填空。char x[]="programming";char y[]="Fortran";int i=0;while(x[i]!='\0' && y[i]!='\0'){if(x[i]==y[i])printf("%c",【 】);elsei++;}A)
A. x[i++]
B. y[++i]
C. x[i]
D. y[i]
19、下列程序段的输出结果是main(){char b[]="Hello,you";b[5]=0;printf("%s \n", b );}A)
A. Hello
B. Hello,you
C. Hell
D. Hello,
20、当执行下面的程序时,如果输入ABC,则输出结果是#include "stdio.h"#include "string.h"main(){char ss[10]="1,2,3,4,5";gets(ss);strcat(ss, "6789");printf("%s\n",ss);}
ABC6789
B. ABC67
C. 12345ABC6
D. ABC456789