网友您好, 请在下方输入框内输入要搜索的题目:

题目内容 (请给出正确答案)

有定义:char* s=〞/t/〞Name//Address/〞〞;, 那么strlen(s)等于()。

  • A、15
  • B、16
  • C、17
  • D、18

参考答案

更多 “有定义:char* s=〞/t/〞Name//Address/〞〞;, 那么strlen(s)等于()。A、15B、16C、17D、18” 相关考题
考题 设串sl=〃DataStructureswithJava〃,s2=〃it〃,则子串定位函数index(s1,s2)的值为()。 A、15B、16C、17D、18

考题 有下列程序: include include "string.h" void tim(char *s[],int n) 有下列程序: #include <stdio.h> #include "string.h" void tim(char *s[],int n) { char *t;int i,j; for(i=0;i<n-1;i++) for(j=i+1;j<n;j++) if(strlen(s[i])>strlen(s[j])) {t=s[i];s[i]=s[j];s[j]=t;} } main() { char *ss[]= {"bcc","bbcc","xy","aaaacc","aabcc"}; fun(ss,5);printf("%s,%s\n",ss[0],ss[4]); } 程序的运行结果是( )。A.xy,aaaaccB.aaaacc,xyC.bcc,aabccD.aabcc,bcc

考题 有以下程序:includeincludeincludevoid f(char*s,char*t){char k;k=*s; * 有以下程序: #include<stdio.h> #include<string.h> #include void f(char*s,char*t) { char k; k=*s; *s=*t; *t=k; s++;t--; if(*s)f(s,t): } main() {char str[10]="abcdefg",*P; P=str+strlen(str)/2+1: f(p,p-2); printf("%s\n",str); } 程序运行后的输出结果是( )。A.abcdefgB.gfedcbaC.gbcdefaD.abedcfg

考题 有以下程序#include stdio.h#include string.hvoid fun(char *s[],int n){ char *t; int i,j;for(i=0;in-1;i++)for(j=i+1;jn;j++)if(strlen(s[i])strlen(s[j])) {t=s[i];s[i]:s[j];s[j]=t;}}main(){ char *ss[]={"bcc","bbcc","xy","aaaacc","aabcc"};fun(ss,5); printf("%s,%s\n",ss[0],ss[4]);}程序的运行结果是A.xy,aaaaccB.aaaacc,xyC.bcc,aabccD.aabcc,bcc

考题 若给出关系Student(S_no,Shame,Sage,S_sex,SD_name,S_add,S_tel),并用SQL语言定义Student关系如下:CREATE Student(S_no CHAR(6), Sname CHAR(30)NOT NULL, Sage CHAR(30), S_sex CHAR(1), SD_name CHAR(20), S_add CHAR(30), S_tel CHAR(20), PRIMARY KEY(S_no));采用(41)向Student中插入记录能被正确地执行。A.INSERT INTO Smdent(S_no,Sname,Sage,S_sex,SD_name,S_add,S_tel)VALUES('010456','黎敏','18',",",",")B.INSERT INTO Student(S_no,Sname,Sage,S_sex,S_r)name,S_add,S_tel)VALUES('010456','黎敏','18','男','计算机学院','北京','88661200')C.INSERT INTO Student(S_no,Sname,Sage,S_sex,SD_name,S_add,S_tel)VALUES(,'黎敏','18','F','计算机学院','北京','88661200')D.INSERT INTO Student(S_no,Sname,Sage,S_sex,SD_name,S_add,S_tel)VALUES('010456',,'18','F','计算机学院','北京','88661200')

考题 以下函数的功能对应于 int fun(char *s,char *t) { while (*s) s++; } return(*s-*t); } A.strlen(s)+strlen(t)B.strcmp(s,t)C.strcpy(s,t)D.strcat(s,t)

考题 有以下程序:includevoid f(char *s, char *t){ char k;k=*s;*s=*t; *t=k;s++;t- -; 有以下程序:#include <string .h>void f(char *s, char *t){ char k; k=*s; *s=*t; *t=k; s++; t- -; if(*s) f(s, t);}main(){ char str[10]="abcdefg",*p; p=str+strlen(str)/2+ 1; f(p,p-2); printf("%s\n", str);}程序运行后的输出结果是( )。A.abcdcfgB.gfedcbaC.gbcdefaD.abedcfg

考题 有以下等程序include void f(char *s, char *t){ chark; k=*s; *s=*t; *t=k; s++;t- 有以下等程序#include <string. h>void f(char *s, char *t){ char k; k=*s; *s=*t; *t=k; s++; t--; if(*s) f(s, t);}main (){ char stt[10] ="abcdefg", *p; p=str+strlen (str)/2+1; f (p,p-2); print f ( "%s\n", str);}A.abcdefgB.gfedcbaC.gbcdefaD.abedcfg

考题 有以下程序并includeincludefun(char * w,int n){char t,*s1,*s2; s1=w;s2= 有以下程序 并include<stdio.h> #include<string.h> fun(char * w,int n) { char t,*s1,*s2; s1=w; s2=w+n-1; while(s1<s2) { t=*s1++; * s1=*s2--; * s2=t; } } main() { char p[]="1234567"; fun(p,strlen(p)); puts(p); } 程序运行后的输出结果是( )A.1234567B.7654321C.1711717D.7177171

考题 有以下程序:includevoid f(char*s,char*t){ char k;k=*s;*s=*t;*t=k;s++;t--;if(*s)f 有以下程序: #include<string.h> void f(char*s,char*t) { char k; k=*s; *s=*t; *t=k; s++; t--; if(*s) f(s,t); } main( ) {char str[10]="abcdefg",*p; p=str+strlen(str)/2+1; f(p,p-2); printf(~%s\n",str); } 程序运行后的输出结果是 ______。A.abcdefB.gfedcbaC.gbcdefaD.abedcfg

考题 若有以下定义: char s(10)="program",t[]="test"; 则下列选项中对字符串操作错误的是( )。A.strcpy(s,t);B.strcat(s,t);C.cout<<strlen(s);D.gets(s);

考题 有以下程序: include void f(char *s,char *t) {char k; k=*s; +s=*t; 有以下程序: #include<string.h> void f(char *s,char *t) {char k; k=*s; +s=*t; *t=k; S++; t--; if(*s) f(s,t); } main() {char.str[10]="abcdefg",*p; p=str+strlen(str) /2+1; f(p,p-2); printf("%s\n",str); } 程序运行后的输出结果是 ______。A.abcdefgB.gfedcbaC.gbcdefaD.abedcfg

考题 有以下程序:includeincludevoid fun(char*s[],int n){char*t;int i,j;for( 有以下程序: #include<stdio.h> #include<string.h> void fun(char*s[],int n) { char*t;int i,j; for(i=0;i<n-1;i++) for(j=i+1;j<n;j++) if(strlen(s[i])>strlen(s[j])){t=s[i];s[i]=s[j];s[j]=t;} } main() { Char*ss[]={"bcc","bbcc","xy","aaaacc","aabcc"}; fun(ss,5);printf("%s,%s\n",ss[0],ss[4]); } 程序的运行结果是( )。A.xy,aaaaccB.aaaacc,xyC.bcc,aabccD.aabcc,bcc

考题 有以下程序includeincludevoidfun(char*s[],intn){char*t;int i,j;for(i=0 有以下程序 #include <stdio.h> #include <string.h> void fun(char *s[],int n) { char *t; int i,j; for(i=0;i<n-1;++) for(j=i+1;j<n;j++) if(strlen(s[i])>strlen(s[j])) {t=s[i];s[i];s[j];s[j]=t;} } main() { char *ss[]={"bccA.xy,aaaaccB.aaaacc,xyC.bcc,aabccD.aabcc,bcc

考题 若给出关系Student(S_no, Sname, Sage, S_sex, SD_name, S_add, S_tel),并用SQL语言定义Student关系如下: CREATE Student(S_no CHAR(6), Sname CHAR(30)NOT NULL, Sage CHAR(30), S_sex CHAR(1), SD_name CHAR(20), S_add CHAR(30), S_tel CHAR(20), PRIMARY KEY(S_no)); 采用(45)向Student中插入记录能被正确地执行。A.INSERT INTO Student(S_no, Sname, Sage, S_sex, SD_name, S_add, S_tel) VALUES('010456', '黎敏', '18', ", ", ", ")B.INSERT INTO Student(S_no, Sname, Sage, S_sex, SD_name, S_add, S_tel) VALUES('010456', '黎敏', '18', '男', '计算机学院', '北京', '88661200')C.INSERT INTO Student(S_no, Sname, Sage, S_sex, SD_name, S_add, S_tel) VALUES(, '黎敏', '18', 'F', '计算机学院', '北京', '88661200')D.INSERT INTO Student(S_no, Sname, Sage, S_sex, SD_name, S_add, S_tel) VALUES('010456', , '18', 'F', '计算机学院', '北京', '88661200')

考题 有下列程序:#includestdi0.h#includestring.hvoidfun(char*s[],intn){char*t;inti,jfor(i=0;in-1;i++)for(j=i+1;jn;j++)if(strlen(s[i]strlen(s[j])){t=s[i];s[i]=s[j];s[j]=t;}}voidmain( ){char*ss[]=(bcc,bbcc,xy,aaaacc,aab—cc};fun(ss,5);printf(%s,%s\n,ss[O],ss[4]);}程序的运行结果是( )。A.xy,aaaaccB.aaaacc,xyC.bcc,aabccD.aabcc,bcc

考题 设有定义:char s[12]={"hello"},则cout<<strlen(s)的输出是 ______。A.5B.6C.11D.12

考题 有以下程序: include include void f(char * s,char*t){char k; k=*s;*s=* 有以下程序: #include <stdio.h>#include <string.h>void f(char * s,char*t){ char k; k=*s; *s=*t; *t=k; s++; t--; if( * s) f(s,t);}main( ){ char str[10] :"abedefg", * p; p = str + strlen(str)/2+1; f(p,p -2); printf( "% s \n" ,str);程序运行后的输出结果是( )。A.abcdefgB.gfedcbaC.gbcdefaD.abedcfg

考题 有以下程序includeincludevoidfun(char,*s[],intn){char*t;inti,j; for(i= 有以下程序 #include <stdio.h> #include <string.h> void fun(char,*s[],int n) { char *t; int i,j; for(i=0;i<n-1;i++) for(j=i+1;j<n;j++) if(strlen(s[i])>strlen(s[j])) {t=s[i];s[i]:s[j];s[j]=t;} } main() { char *ss[]={"bcc","bbcc","xy","aaaacc","aabcc"}; fun(ss,5); printf("%s,%s\n",ss[0],ss[4]); } 程序的运行结果是A.xy,aaaaccB.aaaacc,xyC.bcc,aabccD.aabcc,bcc

考题 以下程序段的输出结果是()。     char s[]= “\\140\140abc\t”;       prntf(“%d\n”,strlen(s));

考题 贷款帐号有几位组成()。A、15B、16C、17D、18

考题 设有定义:char *s=”/t/”Name//Address/”/n”;,那么strlen(s)等于()A、15B、16C、17D、18

考题 单选题有以下程序:#include #include typedef struct{ char name[10]; char sex; int age;}STU;void fun(STU t){ strcpy(t.name,Tong); t.age++;}main(){ STU s[2] = {Hua, 'm', 18, Qin, 'f', 19}; fun(s[1]); printf(%s,%d,%s,%d, s[0].name, s[0].age, s[1].name, s[1].age);}程序运行后的输出结果是(  )。A Hua,19,Tong,19B Hua,18,Tong,20C Tong,19,Qin,19D Hua,19,Tong,19

考题 单选题有定义:char* s=〞/t/〞Name//Address/〞〞;, 那么strlen(s)等于()。A 15B 16C 17D 18

考题 单选题有以下程序:#include #include typedef struct{ char name[10]; char sex; int age;}STU;void fun(STU *t){ strcpy((*t).name,Tong); (*t).age++;}main(){ STU s[2] = {Hua, 'm', 18, Qin, 'f', 19}; fun(s+1); printf(%s,%d,%s,%d, s[0].name, s[0].age, s[1].name, s[1].age);}程序运行后的输出结果是(  )。A Hua,18,Tong,20B Hua,18,Qin,19C Tong,19,Qin,19D Hua,19,Tong,19

考题 单选题有以下程序:#include #include void fun(char *s[],int n){ char *t; int i,j; for(i=0;i  for(j=i+1;j   if(strlen(s[i])strlen(s[j]))   {    t=s[i];    s[i]=s[j];    s[j]=t;   }}main(){ char *ss[]={"bcc","bbcc","xy","aaaacc","aabcc"}; fun(ss,5); printf("%s,%s",ss[0],ss[4]);}程序的运行结果是(  )。A xy,aaaaccB aaaacc,xyC bcc,aabccD aabcc,bcc

考题 单选题设有定义:char *s=”/t/”Name//Address/”/n”;,那么strlen(s)等于()A 15B 16C 17D 18