下面的程序段将输出computer,填空:char c[]="it's a computer";for(i=0;___________________;i++){_______________________printf("%c",c[i]);}
查看答案
设已定义: char s1[8],s2[8]="Science"; 能将字符串"Science"赋给数组s1的语句是( ).
A. s1=s2;
B. strcpy(s2,s1);
C. strcpy(s1,s2);
D. s1="Science";
以下程序段运行后输出结果是( )。chars[]="info\0mis";printf("%d",strlen(s));
A. 4
B. 5
C. 8
D. 9
下面程序的功能是在三个字符串中找出最小的,请填空。#include#includemain(){chars[20],str[3][20];inti;for(i=0;i<3;i++)gets(str[i]);strcpy(s,_____);if(strcmp(s,str[1])>0)strcpy(s,str[1]);if(strcmp(s,str[2])>0)strcpy(s,str[2]);printf("%s\n",__ ____);}
下面程序的运行结果是( )。#include#includemain(){char a[80]=”AB”,b[80]=”LMNP”;int i=0strcat(a,b);while(a[i++]!=’\0’) b[i]=a[i]puts(b);}
A. LB
B. ABLMNP
C. AB
D. LBLMNP