请问如下哪些语句正确?(多选)A: String s1=”abc”; String s2=”abc”;则s1= =s2B: String[] s=”abc”;C: new String s=”abc”;D: String s=new String(“abc”);
如有char *s1=hello,*s2; s2=s1;,则( )。
若有以下定义和语句chars1[10]=abcd!,*s2=n123\
若有以下定义和语句char s1[10]=abcd!,*s2= 123\
若有定义:char a[4]=abc, b[20]=Hello
判断下面程序的输出结果()#include#includevoidmain(){chars1[]=ABCDEF,s2[]=aB;printf(%d\n,strcmp(s1,s2));}
智慧职教: 设有以下字符串定义,则数组s1和s2( )。char s1[]={ 'S' ,'t', 'r' ,'i','n', 'g'};char s2[]= String;
下面C语言语句定义了( )。struct student{ int num;char name[20];char sex;}s1,s2;
有以下程序#includemain(){ FILE *pf;char *s1=\China\,*s2=\Beijing
06410101:若有语句:char s1[10], s2[10]={\books\},则能将字符串books赋给数组s1的正确语句是( )。
有以下程序 #include main() { FILE *pf; char *s1=\China\,*s2=\Beijing
已知char s1[]=”abcd”,s2[]=”efg”;,则strlen(strcpy(s1,s2))的值是_____。
若有语句:char s1[10], s2[10]=\books
有以下程序 include <stdio.h> main() { FILE*pf, char *s1="China",*s2="Beijing"; pf=fopen("abc.dat","wb+"); fwrite(s2,7,1,pf); rewind(pf); /*文件位置指针回到文件开头*/ fwrite(s1,5,1,pf); fclose(pf); } 以上程序执行后abc.dat文件的内容是______。
若已包括头文件<string.h>且已有定义char s1[18],s2={"ABCDE"}和int i,现要将字符串 "ABCDE"赋给s1,下列语句错误的是()。
以下程序:main(){chars1[40]="country",s2[20]="side";inti=0,j=0;while(s1[i]!='\0')i++;while(s2[j]!='\0')s1[i++]=s2[j++];s1[i]=0;printf("%s\n",s1);}的输出结果为()
已有变量定义:char s1[80]=”hello”,s2[80]=”world”,s3[80]; 函数调用:strcat(strcpy(s3,s2+1),s1+2);puts(s3);结果是()。
若有以下定义和语句:char*s1="12345",*s2="1234";printf("%d\n",strlen(strcpy(s1,s2)));则输出
设有“char *s1="ABCDE", *S2="ABCDE", *S3=S1;”,下列表达式中值不等于true的是()
"阅读以下函数fun(char *sl,char *s2){int i=0;while(s1【i】==s2【i】&&s2【i】!='\0') i++;return(s1【i】=='\0'&&s2【i】=='\0');}此函数的功能是是()
char *s1="hello",*s2;s2=s1;,则
以下程序main(){chars1[20]=“abc”,s2[20]=“123”;if(strcmp(s1,s2)>0)printf(“%s\n”,s1);elseprintf(“%s\n”,s2);}的输出结果是()
阅读以下函数: fun(char *s1,char *s2) int i=0; while(s1[i]==s2[i]&&s2[i]!="