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

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

下面函数的功能是()sss(s,t)char*s,*t;{ while((*s)&&(*t)&&(*t++==*s++));return(*s- * t); }

A.求字符串的长度

B.比较两个字符串的大小

C.将字符串s复制到字符串t中

D.将字符串s接续到字符串t中


参考答案

更多 “ 下面函数的功能是()sss(s,t)char*s,*t;{ while((*s)&&(*t)&&(*t++==*s++));return(*s- * t); }A.求字符串的长度B.比较两个字符串的大小C.将字符串s复制到字符串t中D.将字符串s接续到字符串t中 ” 相关考题
考题 以下与库函数strcmp(char *s, chat *t)的功能相等的程序段是()。 A.strcmp1(char *s, chat *t){ for ( ;*s++==*t++ ;)if (*s=='\0') return 0return (*s-*t)}B.strcmp2(char *s, char *t){ for( ;*s++==*t++ ;)if (!*s) return0return (*s-*t)C.strcmp3(char *s, char *t){ for ( ;*t==*s ;){ if (!*t) return 0t++s++}return (*s-*t)}D.strcmp4(char *s, char *t){ for( ;*s==*t;s++,t++)if (!*s) return 0return (*t-*s)}

考题 有以下程序includevoidfun(char*t,char*s){while(*t!=0)t++;while((*t++=*s++)!=0);}m 有以下程序 #include <stdio.h> voidfun(char*t,char*s) {while(*t!=0) t++; while((*t++=*s++)!=0); } main() {char ss[10]="acc",aa[10]="bbxxyy"; fun(ss,aa); printf("%s,%s\n",ss,aa); } 程序的运行结果是A.accxyy,bbxxyyB.acc,bbxxyyC.accxxyy,bbxxyyD.accbbxxyy,bbxxyy

考题 以下函数的功能对应于 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)

考题 下面函数的功能是( ) sss(s,t) char *s,*t; { while((*s)(*t)(*t++==*s++)); return(*s- * t); }A.求字符串的长度B.比较两个字符串的大小C.将字符串s复制到字符串t中D.将字符串s接续到字符串t中

考题 下面函数的功能是( )。 sss(s,t) char*s,*t; {while(*s); while(*t) *(s++)=*(t++); return s; }A.将字符串s复制到字符串t中B.比较两个字符串的大小C.求字符串的长度D.将字符串t续接到字符串s中

考题 下列函数的功能是set(s,t){ char *s,*t; while((*s)(*t)(*t++==*s++)); return(*s-*t);}A.求字符串的长度B.比较两字符串的大小C.将字符串s复制到字符串t中D.将字符串s连接到字符串t后

考题 下面函数的功能是( )。 sss(s,t) char*s,*t; {while((*s)(*t)(*t++==*s++)); return(*s-*t): }A.将字符串s复制到字符串t中B.比较两个字符串的火小C.求字符串的长度D.将字符书s接续到字符串t中

考题 删除字符串的所有前导空格,请完善程序。 #include <stdio.h> void f1(char *s) { char *t; t=________; while(*s==' ') s++; while(*t++=*s++); return; } int main() { char str[80]; gets(str); f1(str); puts(str); return 0; }

考题 与while(*s++ = *t++ );等价的程序段是A.do { *s = *t++; } while (*s++ );B.while (*t ) *s++ = *t++;C.do { *s++ = *t++; } while (*t );D.while (*s ) *s++ = *t++;